locked
how to save the viewstate at the server side instead of __VIEWSTATE hidden field? RRS feed

  • Question

  • User-1800127182 posted

    hi guys,

    i am facing the following problem while saving the viewstate on the server side using the savepagestatetopersistencemedium, but this is not working for the pages which contains update panel.

    anybody had experience this kind of problem.please let me know.

    Thanks,

    Burepalli V S Rao.

    Thursday, February 10, 2011 12:29 PM

Answers

  • User-660870441 posted

    Hi,

    Please consider implementing a custom View State Provider. According to the document (Control.SaveViewState Method), you should override the SaveViewState and LoadViewState methods:

    When view state is saved, this string object is returned to the client as a variable that is stored in an HTML HIDDEN element. When you author a custom server control with a custom view state, the view state can be managed explicitly with the SaveViewState and LoadViewState methods.

    Hope this helps.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 14, 2011 12:17 AM

All replies