The sequence of events when the page loads the user control

zhaozj2021-02-17  50

WebUserControl1 placement sequence of events when the user controls directly on the WebForm1 page: WebUserControl1_Init
WebForm1_Init
Page_Load
WebUserControl1_Load
WebForm1_PreRender
WebUserControl1_PreRender
WebUserControl1_Unload
WebForm1_Unload

In using OnInit method WebForm1 page of the sequence of events WebUserControl1 during code Load user control: WebForm1_Init: OnInitWebForm1: Loading controlsWebUserControl1_Init: OnInitWebForm1: added to ControlsWebForm1: LoadViewState WebUserControl1: LoadViewStateWebUserControl1: LoadPostData BeginWebUserControl1: LoadPostData EndWebForm1_PageLoad: OnLoad after base's Onload WebUserControl1_Load:. After Base's OnLoadiWebuserControl1: RaisePostDataChangeWebform1: onprender WebuserControl1: onprenderwebform1: SaveViewState WebuserControl1: SaveviewState

In the sequence of events WebUserControl1 when Page_Load method WebForm1 page with the code Load user control: WebForm1_Init: OnInitWebForm1: LoadViewState WebForm1_PageLoad: OnLoad after base's Onload WebForm1:. Loading controlsWebUserControl1_Init: OnInitWebUserControl1: LoadViewStateWebForm1: added to ControlsWebUserControl1_Load: after base's OnLoadWebUserControl1: LoadPostData BeginWebUserControl1: LoadPostData EndiWebuserControl1: RaisePostDataChangeWebform1: OnPrender WebuserControl1: onprenderwebform1: SaveViewState WebuserControl1: SaveviewState

WebUserControl1 sequence of events when the code in the Button1_Click event with WebForm1 page Load user control: WebForm1_Init
Page_Load
Button1_Click
WebUserControl1_Init
WebUserControl1_Load
WebForm1_PreRender
WebUserControl1_PreRender
WebUserControl1_Unload
Webform1_unload

转载请注明原文地址:https://www.9cbs.com/read-29381.html

New Post(0)