Click here to Skip to main content
15,671,149 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have design a small project in c# dot net. There are many pages in the project.In a Login.aspx Page there is a LOGIN button. After successful login, redirected to TaskIndex.aspx Page. The TaskIndex.aspx page contains SIGNOUT button. I want that, after sign out , redirected to Login.aspx page. Upto this is alright, but when i click on BACK bytton On Browser or FORWARD button on the Browser, it will redirected automatically to previous as well as next page . this is my problem. I want to protect it. How it is possible? Please Help Me? waiting.............? for answer.

please Help me again.

Have you tried FormsAuthentication.SignOut[^] - if you have used proper authentication procedures, it should work.
Share this answer
Monjurul Habib 31-Jul-11 11:06am    
nice link my 5.
if you sign out by Session.Abandon(); then you can try this code on page load of
TaskIndex.aspx page.
protected void Page_Load(object sender, EventArgs e)
Share this answer
Share this answer
I think on SIGN OUT u are redirecting the page to login page using Response.Redirect u are not closing the session. thats y on back button u got the TaskIndex Page.

Try FormAuthentication.SignOut();


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