ASP.NET Page Life Cycle Events:
Table Showing Stage and Corresponding Events
Stage | Events/Method |
Initialization of the page | Page_Init |
Loading of the View State | LoadViewState |
Processing of the Postback data | LoadPostData |
Loading of Page | Page_Load |
Notification of PostBack | RaisePostDataChangedEvent |
Handling of PostBack Event | RaisePostBackEvent |
Pre Rendering of Page | Page_PreRender |
Saving of view state | SaveViewState |
Rendering of Page | Page_Render |
Unloading of the Page | Page_UnLoad |
Setting Up Of the Page :
ASP.NET determines that the page request by a user requires to be parsing and compiling or to render cached copy of the page to be sent. Thus it comes very much before the beginning of the page life cycle. After this, it is also checked that request is a normal request, postback, cross-page postback or callback. The page constructor creates a tree of controls as soon as the HTTP runtime instantiates the page class to perform the request.
Events :
page init
page load
page pre render
page unload
* Page_Init: The server controls are loaded and initialized from the Web form's view state. This is the first step in a Web form's life cycle.
* Page_Load: The server controls are loaded in the page object. View state information is available at this point, so this is where you put code to change control settings or display text on the page.
* Page_PreRender: The application is about to render the page object.
* Page_Unload: The page is unloaded from memory.
No comments:
Post a Comment