单击注销按钮时如何删除所有会话? [英] how to remove all session when click on log out button?
问题描述
protected void linkbtnLogOut_Click(object sender,EventArgs e)
      {
$
          Session.Abandon();
          HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
          HttpContext.Current.Response.Cache.SetNoServerCaching();
          HttpContext.Current.Response.Cache.SetNoStore();
          HttpContext.Current.Response.Redirect("〜/ Login.aspx",false);
      }
protected void linkbtnLogOut_Click(object sender, EventArgs e)
{
Session.Abandon();
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoServerCaching();
HttpContext.Current.Response.Cache.SetNoStore();
HttpContext.Current.Response.Redirect("~/Login.aspx", false);
}
我只使用上面的代码来点击退出按钮时删除所有会话。 ..点击退出按钮之后,它进入登录页面,如果我点击Internet Explorer浏览器上的上一个按钮,它将不会转到页面之前..但它在Chrome和Mozilla浏览器中无法工作
。 .it转到上一页...请帮帮我
im using above code only for removing all session when click on log out button...after click on log out button it came to log in page after that if i click on previous button on Internet Explorer browser it wont go to before page..but it not working in chrome and mozilla browsers..it goes to previous page ...please help me
Giri $
推荐答案
错误的论坛。 请发布@ http://forums.asp.net。
Wrong forum. Please post @ http://forums.asp.net.
这篇关于单击注销按钮时如何删除所有会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!