Friday, April 2, 2010

ASP.NET Page life cycle

Each time a request arrives at a Web server for an ASP.NET Web page, the first thing the Web server does is hand off the request to the ASP.NET engine. The ASP.NET engine then takes the request through a pipeline composed of numerous stages, which includes verifying file access rights for the ASP.NET Web page, resurrecting the user's session state, and so on. At the end of the pipeline, a class corresponding to the requested ASP.NET Web page is instantiated and the ProcessRequest() method is invoked








Diagram showing all the stages of a Page Life Cycle:















All the stages of Page Life Cycle and its relevant methods used are:

(1) Page Initialization = Page_Init

(2) View State Loading = LoadViewState

(3) PostBack data processing = LoadPostData

(4) Page Loading = Page_Load

(5) PostBack Change Notification = RaisePostDataChangedEvent

(6) PostBack Event Handling = RaisePostBackEvent

(7) Page Pre Rendering Phase = Page_PreRender

(8) View State Saving = SaveViewState

(9) Page Rendering = Page_Render

(10) Page Unloading = Page_UnLoad

1 comment: