===========================================================
作者: amyz(http://amyz.itpub.net)
发表于: 2007.11.07 17:42
分类: 一般分类
出处: http://amyz.itpub.net/post/34151/411808
---------------------------------------------------------------
页面装载用户控件时的事件顺序 (转)
在webForm1页面上直接放置用户控件WebUserControl1时的事件顺序:
WebUserControl1_Init <br>
WebForm1_Init <br>
Page_Load <br>
WebUserControl1_Load <br>
WebForm1_PreRender <br>
WebUserControl1_PreRender <br>
WebUserControl1_Unload <br>
WebForm1_Unload <br>
在WebForm1页面的OnInit方法中用代码Load用户控件WebUserControl1时的事件顺序:
WebForm1_Init : OnInit
WebForm1: Loading controls
WebUserControl1_Init : OnInit
WebForm1: added to Controls
WebForm1: LoadViewState
WebUserControl1: LoadViewState
WebUserControl1: LoadPostData Begin
WebUserControl1: LoadPostData End
WebForm1_PageLoad: OnLoad after base's Onload.
WebUserControl1_Load: after base's OnLoad
iWebUserControl1: RaisePostDataChange
WebForm1: OnPreRender
WebUserControl1: OnPreRender
WebForm1: SavedViewState
WebUserControl1: SaveViewState
在WebForm1页面的Page_Load方法中用代码Load用户控件WebUserControl1时的事件顺序:
WebForm1_Init : OnInit
WebForm1: LoadViewState
WebForm1_PageLoad: OnLoad after base's Onload.
WebForm1: Loading controls
WebUserControl1_Init : OnInit
WebUserControl1: LoadViewState
WebForm1: added to Controls
WebUserControl1_Load: after base's OnLoad
WebUserControl1: LoadPostData Begin
WebUserControl1: LoadPostData End
iWebUserControl1: RaisePostDataChange
WebForm1: OnPreRender
WebUserControl1: OnPreRender
WebForm1: SavedViewState
WebUserControl1: SaveViewState
页面装载用户控件时的事件顺序 (转)
最新推荐文章于 2021-02-25 17:18:36 发布