Oana and Arthur | Our dev blog




Quick reference: Page Life Cycle cu MasterPage si UserControls

Am adaugat acest post ca sa evit cautarile de fiecare data.
Articolul: http://forums.asp.net/t/1191194.aspx descrie mai detaliat ordinea evenimentelor si mi s-a parut foarte util.

Scenariul pe scurt:
- Pagina are un MasterPage
- In pagina exista un UserControl
- In UserControl exista un alt UserControl (child)
- In UserControlul child exista un Buton

Ordinea evenimentelor pentru click pe buton:

BeginRequest - HttpModule
AuthenticateRequest - HttpModule
PostAuthenticateRequest - HttpModule
PostAuthorizeRequest - HttpModule
ResolveRequestCache - HttpModule
PostResolveRequestCache - HttpModule
PostMapRequestHandler - HttpModule
AcquireRequestState - HttpModule
PostAcquireRequestState - HttpModule
PreRequestHandlerExecute - HttpModule

PreInit - Page

Init - ChildUserControl
Init - UserControl
Init - MasterPage
Init - Page

InitComplete - Page

LoadPageStateFromPersistenceMedium - Page 

ProcessPostData (first try) - Page

PreLoad - Page

Load - Page
Load - MasterPage
Load - UserControl
Load - ChildUserControl

ProcessPostData (second try) - Page

RaiseChangedEvents - Page
RaisePostBackEvent - Page

Click - Button - ChildUserControl

DataBinding - Page
DataBinding - MasterPage
DataBinding - UserControl
DataBinding - ChildUserControl

LoadComplete - Page

PreRender - Page
PreRender - MasterPage
PreRender - UserControl
PreRender - ChildUserControl

PreRenderComplete - Page

SaveViewState - Page
SavePageStateToPersistenceMedium - Page
SaveStateComplete - Page

Unload - ChildUserControl
Unload - UserControl
Unload - MasterPage
Unload - Page

PostRequestHandlerExecute - HttpModule
ReleaseRequestState - HttpModule
PostReleaseRequestState - HttpModule
UpdateRequestCache - HttpModule
PostUpdateRequestCache - HttpModule
EndRequest - HttpModule
PreSendRequestHeaders - HttpModule
PreSendRequestContent - HttpModule 

Tags: , ,
Categories: .NET | Web
1 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed