viewstate question

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.
 
K

Kevin Spencer

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.
 
W

Will

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.





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top