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

I place Logout button in my web form. The user clicks the logout button that sends him to the login page. I'm using code like:

Session["username"] == null;

In this code I Redirect to the login page, but my problem is when I click the back arrow button of the browser it goes to the previous pages.

Please give a solution for only displaying a login page after clicking the logout button when i click the back arrow button of browser, and not going to any another pages.

Updated 24-May-10 3:09am

Why don't you guys search the forum before posting?... we have replied this number of times...
You need to reset history of browser![^]
Use the following code to expire the cache of the browser when the user logs out

Fro browser other the IE you can use

For more details check[^]

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