From the course: ASP.NET Web Forms Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Managing state

Managing state - ASP.NET Tutorial

From the course: ASP.NET Web Forms Essential Training

Start my 1-month free trial

Managing state

- [Instructor] Next, let's discuss about how state is managed inside ASP.NET web forms applications. So if you remember we had a discussion about the page lifecycle a little bit earlier and we had three different phases. The Init phase, the Load phase, and the Render phase. Now I mentioned then that I will take this discussion up again in order to introduce the notion of the state and how this one is actually managed in this context. So when we make a normal request, so that means the very first get to a page, in the Render phase we have two more methods that are going to get called. One of them is called SaveState. So SaveState would actually go and get all the information from every single control that is on that particular page and it will encode it into a variable called ViewState and it will send it to that particular page. When all the information get acquired, then the SaveStateComplete event will get triggered and then the Render is going to happen. Now when we are going to…

Contents