asp.net:什么是控制/页相比,它里面用户contorl页面生命周期的订单? [英] asp.net: what's the page life cycle order of a control/page compared to a user contorl inside it?

查看:142
本文介绍了asp.net:什么是控制/页相比,它里面用户contorl页面生命周期的订单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个aspx和里面的ASCX。
从短的测试中,我看到了ASPX的pageLoad的用户控制的pageLoad的被调用之前,但事实正好相反为的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 OnInit.

是否有人知道什么是事件的顺序(页面相比,它里面的用户控件)

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

感谢

推荐答案

您应该看看这个 ASP.NET页生命周期概述和<一个href=\"http://www.aspnetzone.de/blogs/peterbucher/archive/2007/07/21/asp-net-page-control-adapter-lifecycle-diagramm.aspx\">this

页:preINIT结果
控制:初始化结果
页:初始化结果
页:InitComplete结果
页:preLOAD结果
页:加载结果
控制:加载结果
页:LoadComplete结果
页:preRender结果
控制:preRender结果
页:preRenderComplete结果
页:SaveStateComplete结果
页:RenderControl结果
页:渲染结果
控制:RenderControl结果
控制:卸载结果
控制:处置结果
页:卸载结果
页:处置

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

这篇关于asp.net:什么是控制/页相比,它里面用户contorl页面生命周期的订单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆