I am developing a custom control that needs it's viewstate to be loaded on init. Can I antecipate the view state loading at any time?
views:
37answers:
1
+4
A:
No. The purpose of ViewState loading when it does is because it FIRST loads your controls default values (i.e. what you have in your aspx files) and THEN overwrites it with your ViewState (i.e. previously submitted values) and THEN overwrites that with your post data. You can't mess with that order or you break the entire page lifecycle within ASP.NET. You MIGHT be able to take a look at the Request and/or Response objects and pick things out of there manually, but you can't have the framework do it for you.
Jaxidian
2010-03-27 18:32:52