Retaining control state of page when user uses browser back arrow

grapin

New member
Joined
May 22, 2009
Messages
1
Programming Experience
1-3
Hi, Everyone:

I am programming a ASP 2.0 (VB.NET code behind) web application, in VS 2005. There are two pages to the application.

When the user uses the back arrow on the second page (to return to the first page), the state of some of the first-page controls is not maintained. For example, a dropdown list is dimmed out on the first page. When user returns to the first page, after using the back arrow, the dropdown list is no longer dimmed out.

I have researched this issue, and there is a lot of talk about caching in ASP.NET 2.0, and so far I cannot get that to work.

How is everybody else handling the above? Any advice is appreciated.

Thanks in advance for your help.
 
During click of back button, I noticed that the page_load event of the page do not trigger. One solution is to control your state during page_load and make sure that even a click of back button will trigger the page_load event. You can add this line on your page_load event:

response.cache.setnostore()

Good Luck
 
Back
Top