Click here to Skip to main content
15,900,378 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more: (untagged)
I have created a link button as signout.

On click of liink button i have done following coding

FormsAuthentication.SignOut();
Response.Redirect("Login1.aspx");

This works only if i try to access any page by typing in url.
but if i click on back button it permits me to visit the page..

Might be my cookies are interfering with this as i have used persistant cookie on the login page..

Please suggest a soln to this

scotchy
Posted

1 solution

Hi scotchy

The page is probably being cached.
To turn off caching for the page, use this code:

Response.Expires = 0<br />Response.Cache.SetNoStore()<br />Response.AppendHeader("Pragma", "no-cache")


Regards
Rajeesh MP
 
Share this answer
 


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