Why is it recommended to save viewstate values in the PreRender event call?

Posted by Andrew on Stack Overflow See other posts from Stack Overflow or by Andrew
Published on 2009-08-31T19:26:28Z Indexed on 2010/06/09 22:22 UTC
Read the original article Hit count: 164

Filed under:

I am trying to persist member variables by saving them in the ViewState (only a few small variables) however I read up and I gather its better to save them into the ViewState at the PreRender stage than PageLoad?

I can see that the ViewState can be saved to anytime before Page rendering, but does it make any difference in PreRender or PageLoad?

© Stack Overflow or respective owner

Related posts about ASP.NET