ASP.NET Application Life Cycle
In ASP.NET, a WEB page has execution Life-Cycle that includes 8 phases:
1. Page Request:
When a page is requested by the user, ASP.NET parses and compiles that page.
2. Start: In this stage, page properties such as Request and Response are set. It also determines the Request type.
3. Initialization: During this stage, we can access the controls on the page but the control’s ViewState has not yet been initialized.
4. Load: In case of a postback, the control’s properties have been initialized from the ViewState.
5. Validation: Sometimes, there can be some validation set on the form.
6. Control Events: In the case of a postback, the control’s events are called.
7. Rendering: During the rendering stage, the page calls the Render method for each control and thus each control generates the HTML output that is merged with the resulting HTML of the page.
8. Unload: In this stage, the generated page output has already been sent to the client and the page can be discarded.