Normal page lifecycle stage:
Generally, the lifecycle of a common page goes through the following stages. The application phase occurs both before and after. For more information, see application lifecycle.
1. Page request
Description: a page request occurs before the page lifecycle. When the page is requested by the user, asp.net determines whether to parse and compile the page, or whether a page with memory version can be returned without running the page.
2. Start:
Description: In the start step, page attributes such as request and response are set. In this phase, the page determines whether postback or a new request is required and sets the ispostback attribute. In addition, the uiculture attribute of the page is set.
3. Page initialization:
Description: The control is available during initialization and the UniqueID attribute of each control is set. All page themes are also applied. If the current request is a secondary request (postback), The postback data is not loaded and the properties of the control cannot be read and assigned from the viewstate.
4. Load:
Description: if the current request is postback during loading, the control property is restored from viewstate and control status information.
5. Verification:
Description: The verification methods for all the isVaild attributes and independent verification controls on the page are called.
6. postback event handling:
Description: If it is postback, handler calls all events.
7. Rendering:
Description: Before rendering, viewstate saves the page and all controls. At this stage, the page calls the Render method of each control and provides a text writer to write the outputStream of the response attribute of the page.
8. Uninstall:
Description: When the page is completely displayed, it is returned to the client and the preparation is abandoned. At this time, the page's response and request attributes are uninstalled and cleared.
Asp.net page events:
1 page_preInit
2 page_Init
3 page_InitComplete
4 page_PreLoad
5 page_Load
Control events
6 page_LoadComplete
7 page_SaveStateComplete
8 page_Render
9 page_Unload