[ACCEPTED]-In ASP.Net, during which page lifecycle event does viewstate get loaded?-page-lifecycle
It's loaded into memory between init and 2 load. See this article for a full break down of the 1 page lifecycle.
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! :)
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
You can see from the page life cycle as 4 explained on MSDN
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
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.