hi
in my project when i click on logout anchor it goes to logout page and my code in logout page is
if (Session["user_id"] != null)
{
Session["user_id"] = null;
Session.Abandon();
Response.Clear();
FormsAuthentication.SignOut();
Response.Redirect("login.aspx");
}
it properly logout and goes to login.aspx but problem is login.aspx when i click browser back button it goes me again on last page where i click on logout anchor.
please any body know solution of this please reply me
Loading
Niradhip ChakrabortyPosted Aug 19, 2008, 7:43 PM
Add the following code in page behind of log out page.
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
string sb;
sb = "";
Page.RegisterClientScriptBlock("clientScript", sb);
}
shahidPosted Aug 19, 2008, 1:43 PM
Scott LyslePosted Aug 18, 2008, 6:22 AM
When the user logs out, try expiring the cache:
Response.Cache.SetExpires(DateTime.Now)
Response.Cache.SetCacheability(HttpCacheability.Private)
Scott LyslePosted Aug 18, 2008, 6:22 AM
When the user logs out, try expiring the cache:
Response.Cache.SetExpires(DateTime.Now)
Response.Cache.SetCacheability(HttpCacheability.Private)