Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have some problems in logout page in ASP.Net.

please give me the suggestions for:-

1) Session end

2) When pressing back button after logout it should be redirect to login

page.
Posted

 
Share this answer
 
You can end the session using Session.Clear().

For the back button issue ,look at this really good articles:
Browser Back Button Issue After Logout[^]
Browser back button issue after logout[^]

-KR
 
Share this answer
 
v2
Sessions are not related to authentication, so you should code your site such that it can survive session timeouts. As for the "back" issue, I'd just ignore it. All they're doing is seeing things they've already seen. To stop this happening would require you to disable caching which will have a negative effect on site performance for no benefit.
 
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