开发者

asp.net: what's the page life cycle order of a control/page compared to a user contorl inside it?

开发者 https://www.devze.com 2023-04-03 11:00 出处:网络
I have an aspx and inside it an ascx. From a short testing I see the PageLoad of the aspx is called before the PageLoad of the user-Control but the opposite is true for 开发者_JAVA百科OnInit.

I have an aspx and inside it an ascx. From a short testing I see the PageLoad of the aspx is called before the PageLoad of the user-Control but the opposite is true for 开发者_JAVA百科OnInit.

Does someone know what is the order of the events (page compared to a user-control inside it)

Thanks


You should look at this ASP.NET Page Life Cycle Overview and this

Page: PreInit
Control: Init
Page: Init
Page: InitComplete
Page: PreLoad
Page: Load
Control: Load
Page: LoadComplete
Page: PreRender
Control: PreRender
Page: PreRenderComplete
Page: SaveStateComplete
Page: RenderControl
Page: Render
Control: RenderControl
Control: Unload
Control: Dispose
Page: Unload
Page: Dispose


below link has more information

http://weblogs.asp.net/ricardoperes/archive/2009/03/08/asp-net-page-events-lifecycle.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消