views:

1796

answers:

4

I know it happens sometime before Load, but during what event exactly?

+9  A: 

It's loaded into memory between init and load. See this article for a full break down of the page lifecycle.

Kilhoffer
If you need to handle the ViewState in a custom way look up the `LoadViewState` and `SaveViewState` functions.
Aydsman
+1  A: 

Here's a cheat sheet for the life cycle process

John Sheehan
Where? No link...
+4  A: 

That is to say, viewstate is loaded between the OnInit() and OnLoad() events of the page.

My favorite article on dealing with viewstate, which answers every question I have every time: http://weblogs.asp.net/infinitiesloop/archive/2006/08/03/Truly-Understanding-Viewstate.aspx

Noel
A: 

Check this article, it lists down the events in the sequence: http://www.altafkhatri.com/Altaf/ASP%5FNET%5FPage%5FLife%5FCycle%5FAnd%5FEvents/Common%5FASP%5FNET/Page%5FEvents