Question:-How to Logout from page with Session
Answer:-
write following code in page load event
Response.Cache.SetNoStore();
write following code in Under Logout Button
Session.Abandon();
System.Web.Security.FormsAuthentication.SignOut();
Session.Contents.RemoveAll();
Response.Redirect("login.aspx");
Answer:-
write following code in page load event
Response.Cache.SetNoStore();
write following code in Under Logout Button
Session.Abandon();
System.Web.Security.FormsAuthentication.SignOut();
Session.Contents.RemoveAll();
Response.Redirect("login.aspx");
No comments:
Post a Comment