i m working on asp.net project and ia m facing a problem ..
when click on logout button page is redirect to login page but still pages are viewed that are previously view. so, how can i am stop this Viewing that pages after logout and where i am implement this code....
when click on logout button page is redirect to login page but still pages are viewed that are previously view. so, how can i am stop this Viewing that pages after logout and where i am implement this code....
Please try using SignOut method:
public void LoginLink_OnClick(object sender, EventArgs args)
{
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();
}
More information about this method please check below:
Nitin_Kumar
Member
4 Points
54 Posts
for clear cache after logout
Jun 29, 2012 05:18 AM|LINK
hi.. AspNet Community.
i m working on asp.net project and ia m facing a problem ..
when click on logout button page is redirect to login page but still pages are viewed that are previously view. so, how can i am stop this Viewing that pages after logout and where i am implement this code....
qamar_luct
Member
44 Points
24 Posts
Re: for clear cache after logout
Jun 29, 2012 05:24 AM|LINK
what do mean by "still pages are viewed that are previously view" ? Can you please elaborate more.
qamar_luct
Member
44 Points
24 Posts
Re: for clear cache after logout
Jun 29, 2012 05:26 AM|LINK
please follow this link to clear all the cache.
http://weblogs.asp.net/morteza/archive/2008/08/11/how-to-remove-all-items-from-cache-memory.aspx
Hope this helps. thanks
vijay_myl
Contributor
5070 Points
1068 Posts
Re: for clear cache after logout
Jun 29, 2012 05:38 AM|LINK
hi..
Use the below code to clear the cache .......
My .NET blog
Submit Article
Mamba Dai - ...
All-Star
23531 Points
2683 Posts
Microsoft
Re: for clear cache after logout
Jul 04, 2012 07:48 AM|LINK
Hi,
Please try using SignOut method:
public void LoginLink_OnClick(object sender, EventArgs args) { FormsAuthentication.SignOut(); FormsAuthentication.RedirectToLoginPage(); }More information about this method please check below:
http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.signout.aspx
Feedback to us
Develop and promote your apps in Windows Store
frez
Contributor
5418 Points
913 Posts
Re: for clear cache after logout
Jul 04, 2012 07:54 AM|LINK
Have a look at my blog article
http://geekswithblogs.net/Frez/articles/back-button-issue-after-logout-in-asp.net.aspx