Go4Expert

Go4Expert (http://www.go4expert.com/)
-   ASP (http://www.go4expert.com/forums/asp/)
-   -   How to destroy user session (http://www.go4expert.com/forums/destroy-user-session-t21666/)

shyam_oec 5Apr2010 15:38

How to destroy user session
 
Hi,
for just testing purpose i have created two .aspx page. In page1 a TextBox and a Button,if user inputs "1234" in TextBox then page wil be redirected to Page2.
In page2 a Button Logout. In Button's click event i have writen

Code:

  Session.Remove("uid")
  Session.Abandon()
  Response.Redirect("SessionTest1.aspx")

where "uid" is Session variable.

Through this user aging goes to Page1.That's fine, but when browser's back button is pressed it goes to previous page, showing user profile. Page is loaded from cache.Actually this should not happen , and in reality this does not happen. So ,how to properly manage state information and restrict the browser to load page which is stored in cache?
Thanks.


All times are GMT +5.5. The time now is 16:56.