how to reset a control to pre-viewstate state

Discussion in 'ASP .Net' started by Andy Fish, Jan 27, 2006.

  1. Andy Fish

    Andy Fish Guest

    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
    Andy Fish, Jan 27, 2006
    #1
    1. Advertising

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

    "Andy Fish" wrote:

    > 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
    >
    >
    >
    =?Utf-8?B?RG91ZyBTYWxvbW9u?=, Jan 27, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Weng Tianxiang
    Replies:
    7
    Views:
    1,078
    Mike Treseler
    Nov 25, 2003
  2. Rocky Moore
    Replies:
    7
    Views:
    1,715
    mikeb
    Jan 14, 2004
  3. =?Utf-8?B?S2V2aW4gQnVydG9u?=

    Pre-Send Request Headers, Pre-Send Request Content

    =?Utf-8?B?S2V2aW4gQnVydG9u?=, Dec 31, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,028
    =?Utf-8?B?S2V2aW4gQnVydG9u?=
    Dec 31, 2004
  4. Wladimir Borsov
    Replies:
    7
    Views:
    462
    Raymond Loman
    May 5, 2004
  5. Juha Nieminen
    Replies:
    3
    Views:
    1,128
    Juha Nieminen
    Feb 22, 2008
Loading...

Share This Page