清空Session中的值!
比如:
Session["UserName"]="";
Response.Redirect("起始页");

解决方案 »

  1.   

    visualcpu(平凡的程序员) :
    你没有理解我的意思,我想实现的是,当我打开需要登陆才能进入的A界面时,先转到登陆界面B进行登陆,登陆后自动回到先前要进入的界面A,该如何保存进入A界面是的参数等状态呢?
      

  2.   

    我也想知道:我使用RegisterStartupScript("back","<script language='javascript'>history.back(1)</script>");不行,不知道为什么
      

  3.   

    FormsAuthentication.RedirectFromLoginPage这个方法本身已经内置了
      

  4.   

    你通过web.config对一个文件夹保护之后.
    登录时用这个方法就会自动转向最初的请求页
      

  5.   

    RegisterStartupScript("back","<script language='javascript'>history.back(-1)</script>");history.back(-1) 用-1试试
      

  6.   

    System.Web.Security.FormsAuthentication.RedirectFromLoginPage(userName,false);
      

  7.   

    Response.Write( "<script> history.go(-2) </script>" );这样可以!
      

  8.   

    在你的Web.Config文件中添加如下设置,即可让你的注册页面绕过安全认证:<location path="注册页面.aspx">  <system.web>    <authorization>      <allow users="*" />     </authorization>   </system.web></location>