[ACCEPTED]-In ASP.Net, during which page lifecycle event does viewstate get loaded?-page-lifecycle

Accepted answer
Score: 24

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

Score: 17

I once got into this question too and got 10 my answer from TRULY understanding Viewstate article, which I highly 9 recommend.

After reading it I designed a 8 graphic that helped me to understand better 7 what was happening on between each stage 6 and when and how ViewState was doing its 5 job.

I'd like to share this graphic with 4 other people that (like myself) need to 3 see how stuff work in a more visual way. Hope 2 it helps! :)

Click on the image to view at 1 full width. enter image description here

Score: 6

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

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

Score: 5

You can see from the page life cycle as 4 explained on MSDN

enter image description here

That the view state is loaded 3 during the Load phase of the page lifecycle, i.e. the 2 LoadViewState method of the "Page methods" and the LoadViewState method of the Control 1 methods, above.

More Related questions