how to reset a control to pre-viewstate state

  • Thread starter Thread starter Andy Fish
  • Start date Start date
A

Andy Fish

Hi,

Given a control on a form with viewstate enabled, is there any way to reset
the control to it's default values (i.e. undo any viewstate settings).

I guess I could disable viewstate programmatically and then do a
response.redirect(myself), but I want to do this without a round-trip.

Andy
 
I don't think that there is any "automatic" way to do this, but you should be
able to do it very easily, by storing the original/default value in something
like a session variable, or a hidden field.

Doug
 

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

Back
Top