viewstate question

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

I have a form on my page. when I submit it and hit the
back button on my browser all of the information is gone.
I have enableViewState set to true in my page directive..
isn't that the point of it? what else do I need to do to
get my form to maintain it's state?


I have two methods of submitting that I've tried.. one
does a response.redirect, the other hides the UserControl
with my form on it and shows another UC with my next page
on it. either way when I hit back the form is empty.

I am prepared to store the field values in my session and
have my form pull them back out if they are there (when I
hit back), but I though this viewstate thing was supposed
to take care of all that for me.
 
Viewstate is stored in the HTML of the page. When you hit your browser's
Back button, you are navigating to a previous version of the page, with the
ViewState that was in it at that time.

Is there some reason you NEED to use the Back button of your browser for
navigation in your app?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.
 
no, I was just wondering about that.. thanks

-----Original Message-----
Viewstate is stored in the HTML of the page. When you hit your browser's
Back button, you are navigating to a previous version of the page, with the
ViewState that was in it at that time.

Is there some reason you NEED to use the Back button of your browser for
navigation in your app?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.





.
 
Back
Top