I need to expire previous page so that my users cannot go back to the previous and change the data inside it.Can anyone give me some idea or example on doing this?
Are you using any Authentication?
Do you want to expire the cookies?
no..i don't use any authentication.Must I use authentication or expire the cookies?
No you dont actually need Authentication to clear the cache.If you use authentication you can have better control on your application.
For your application ,
Just add this code to the page load.
Response.Buffer = True Response.ExpiresAbsolute = Now().Subtract(New TimeSpan(1, 0, 0, 0)) Response.Expires = 0 Response.CacheControl = "no-cache"
What happens is It prevents the page from being cached.so that the page will be loaded as a new page rather than taking values from the cache.
previous page is still opening using this code.
on load event of each page use "no-cache" problem is it will maintain zero cache but work properly
Response.Expires = -1