[ASP.NET] Application、Page、Control 生命週期

摘要:[ASP.NET] Application、Page、Control 生命週期

ASP.NET Live Cycle (生命週期) 表


  各事件觸發的順序表 (由上至下)

  • Application: BeginRequest
  • Application: PreAuthenticateRequest
  • Application: AuthenticateRequest
  • Application: PostAuthenticateRequest
  • Application: PreAuthorizeRequest
  • Application: AuthorizeRequest
  • Application: PostAuthorizeRequest
  • Application: PreResolveRequestCache
  • Application: ResolveRequestCache
  • Application: PostResolveRequestCache
  • Application: PreMapRequestHandler
  • Page: Construct
  • Application: PostMapRequestHandler
  • Application: PreAcquireRequestState
  • Application: AcquireRequestState
  • Application: PostAcquireRequestState
  • Application: PreRequestHandlerExecute
  • Page: AddParsedSubObject
  • Page: CreateControlCollection
  • Page: AddedControl
  • Page: AddParsedSubObject
  • Page: AddedControl
  • Page: ResolveAdapter
  • Page: DeterminePostBackMode
  • Page: PreInit
  • Control: ResolveAdapter
  • Control: Init
  • Control: TrackViewState
  • Page: Init
  • Page: TrackViewState
  • Page: InitComplete
  • Page: LoadPageStateFromPersistenceMedium
  • Control: LoadViewState
  • Page: EnsureChildControls
  • Page: CreateChildControls
  • Page: PreLoad
  • Page: Load
  • Control: DataBind
  • Control: Load
  • Page: EnsureChildControls
  • Page: LoadComplete
  • Page: EnsureChildControls
  • Page: PreRender
  • Control: EnsureChildControls
  • Control: PreRender
  • Page: PreRenderComplete
  • Page: SaveViewState
  • Control: SaveViewState
  • Page: SaveViewState
  • Control: SaveViewState
  • Page: SavePageStateToPersistenceMedium
  • Page: SaveStateComplete
  • Page: CreateHtmlTextWriter
  • Page: RenderControl
  • Page: Render
  • Page: RenderChildren
  • Control: RenderControl
  • Page: VerifyRenderingInServerForm
  • Page: CreateHtmlTextWriter
  • Control: Unload
  • Control: Dispose
  • Page: Unload
  • Page: Dispose
  • Application: PostRequestHandlerExecute
  • Application: PreReleaseRequestState
  • Application: ReleaseRequestState
  • Application: PostReleaseRequestState
  • Application: PreUpdateRequestCache
  • Application: UpdateRequestCache
  • Application: PostUpdateRequestCache
  • Application: EndRequest
  • Application: PreSendRequestHeaders
  • Application: PreSendRequestContent

 

參考資料


Application, Page and Control events in ASP.NET v2.0

[ASP.NET]Page Life Cycle整理

ASP.NET 網頁生命週期概觀

ASP.NET Web 伺服器控制項事件模型

 

 


以上文章敘述如有錯誤及觀念不正確,請不吝嗇指教
如有侵權內容也請您與我反應~謝謝您 :)