你把response.redirect(2.aspx,true);
改成
response.redirect(2.aspx,false);
试试看

解决方案 »

  1.   

    楼主的方法我试验过了,是TRUE,没有问题的
      

  2.   

    可为什么我的不行呢,各位高手,能不能介绍一些有关asp.net的session设置的文章。
      

  3.   

    redirect(--,bool_value)bool_value:
    指示当前页的执行是否应终止。 
      

  4.   

    注意大小写!这段代码是绝对没有问题的!!!!!!!!!在a.aspx中:
    Session["username"]="mh";
    Response.Redirect("b.aspx");在b.aspx中:                           string un=(string)Session["username"];
    show.Text=un;