Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Dear


How to use Back Button after logout i asp.net.
Pls Guide me .
Posted

1 solution

Try this...
1. Clear the sessions
2. Clear the cache such that browser has no history (this will make back/forward button in browser grayed out disabled.)
code for clearing cache can be put up in code behind as follows:
C#
// Code disables caching by browser. Hence the back browser button
// grayed out and could not causes the Page_Load event to fire 
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1));
Response.Cache.SetNoStore();

You can add somethin similar in form aspx if you want to place it there:
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0"></meta></meta></meta>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900