Last post Jun 26, 2009 06:57 PM by Ambran
Jun 26, 2009 03:58 PM|dsteveso|LINK
I am currently modifying a custom control I created awhile ago. When looking at some other examples of viewstate I wondered if I did it correctly. I overrode the SaveViewState and LoadViewState methods. It looks like I could have just used ViewState["key"]
to store everything. Are there any benefits / disadvantages to using LoadViewState / SaveViewState over ViewState["key"]?
Jun 26, 2009 06:57 PM|Ambran|LINK
I use ViewState["key"] regularly in order to save some data localy until page returns.
I usualy create a constant for every key so I get better control of the keys that are sometimes spread throughout the page.
I try not to overload ViewStates with data in order for the page not to be too heavy.
ViewState["key"] works fine for me. Never manipulated with the SaveViewState and LoadViewState.