.Net学习笔记 - ASP.NET页面的执行顺序
2008-07-10 15:29
555 查看
[完全版]
Page calls Construct
Page finishes Construct
Page calls New
Page finishes New
Page calls DeterminePostBackMode
Page finishes DeterminePostBackMode
Page calls AddParsedSubObject
Page calls CreateControlCollection
Page finishes CreateControlCollection
Page calls AddedControl
Page finishes AddedControl
Page finishes AddParsedSubObject
ChildControl calls Construct
ChildControl finishes Construct
ChildControl calls New
ChildControl finishes New
Page calls AddParsedSubObject
Page calls AddedControl
Page finishes AddedControl
Page finishes AddParsedSubObject
Page calls AddParsedSubObject
Page calls AddedControl
Page finishes AddedControl
Page finishes AddParsedSubObject
ChildControl calls OnInit
ChildControl raises Init
ChildControl finishes OnInit
ChildControl calls TrackViewState
ChildControl finishes TrackViewState
Page calls OnInit
Page raises Init
Page finishes OnInit
Page calls TrackViewState
Page finishes TrackViewState
Page calls OnLoad
Page raises Load
Page finishes OnLoad
ChildControl calls OnLoad
ChildControl raises Load
ChildControl finishes OnLoad
Page calls EnsureChildControls
Page calls CreateChildControls
Page finishes CreateChildControls
Page finishes EnsureChildControls
Page calls OnPreRender
Page raises PreRender
Page finishes OnPreRender
ChildControl calls EnsureChildControls
ChildControl calls CreateChildControls
ChildControl finishes CreateChildControls
ChildControl finishes EnsureChildControls
ChildControl calls OnPreRender
ChildControl raises PreRender
ChildControl finishes OnPreRender
Page calls SaveViewState
Page finishes SaveViewState
ChildControl calls SaveViewState
ChildControl finishes SaveViewState
Page calls SavePageStateToPersistenceMedium
Page finishes SavePageStateToPersistenceMedium
Page calls CreateHtmlTextWriter
Page finishes CreateHtmlTextWriter
Page calls Render
Page finishes RenderChildren
ChildControl calls Render
ChildControl calls RenderChildren
ChildControl finishes RenderChildren
ChildControl finishes Render
Page finishes RenderChildren
Page finishes Render
ChildControl calls OnUnload
ChildControl raises Unload
ChildControl finishes OnUnload
Page calls OnUnload
Page raises Unload
Page finishes OnUnload
----- 说明:除了Init()和Unload()之外的所有事件都是从最外面到最里面被激发的
[MasterPage版]
ContentPage.PreInit
Master.Init
ContentPage.Init
ContentPage.InitComplete
ContentPage.PreLoad
ContentPage.Load
Master.Load
ContentPage.LoadComplete
ContentPage.PreRender
Master.PreRender
----- 说明:使用母版页时的特例,我们先要了解一个非常重要的知识点——母版页被处理的过程就相当于内容页中的一个控件,这个原因就是内容页中的所有控件都包含在“ContentPlaceholder”里,而ContentPlaceholder”其实就是母版页的一个子控件。现在母版页被处理的过程就相当于内容页中的一个控件,我们早先提到过,除了Init()和Unload()之外的所有事件都是从最外面到最里面被激发的,所以是先ContentPage.Load再Master.Load(Master现在是内容页中的一个子控件)。
[简化版]
OnInit
TrackViewState
OnLoad
EnsureChildControls
CreateChildControls
OnPreRender
SaveViewState
Render
RenderChildren
OnUnload
Page calls Construct
Page finishes Construct
Page calls New
Page finishes New
Page calls DeterminePostBackMode
Page finishes DeterminePostBackMode
Page calls AddParsedSubObject
Page calls CreateControlCollection
Page finishes CreateControlCollection
Page calls AddedControl
Page finishes AddedControl
Page finishes AddParsedSubObject
ChildControl calls Construct
ChildControl finishes Construct
ChildControl calls New
ChildControl finishes New
Page calls AddParsedSubObject
Page calls AddedControl
Page finishes AddedControl
Page finishes AddParsedSubObject
Page calls AddParsedSubObject
Page calls AddedControl
Page finishes AddedControl
Page finishes AddParsedSubObject
ChildControl calls OnInit
ChildControl raises Init
ChildControl finishes OnInit
ChildControl calls TrackViewState
ChildControl finishes TrackViewState
Page calls OnInit
Page raises Init
Page finishes OnInit
Page calls TrackViewState
Page finishes TrackViewState
Page calls OnLoad
Page raises Load
Page finishes OnLoad
ChildControl calls OnLoad
ChildControl raises Load
ChildControl finishes OnLoad
Page calls EnsureChildControls
Page calls CreateChildControls
Page finishes CreateChildControls
Page finishes EnsureChildControls
Page calls OnPreRender
Page raises PreRender
Page finishes OnPreRender
ChildControl calls EnsureChildControls
ChildControl calls CreateChildControls
ChildControl finishes CreateChildControls
ChildControl finishes EnsureChildControls
ChildControl calls OnPreRender
ChildControl raises PreRender
ChildControl finishes OnPreRender
Page calls SaveViewState
Page finishes SaveViewState
ChildControl calls SaveViewState
ChildControl finishes SaveViewState
Page calls SavePageStateToPersistenceMedium
Page finishes SavePageStateToPersistenceMedium
Page calls CreateHtmlTextWriter
Page finishes CreateHtmlTextWriter
Page calls Render
Page finishes RenderChildren
ChildControl calls Render
ChildControl calls RenderChildren
ChildControl finishes RenderChildren
ChildControl finishes Render
Page finishes RenderChildren
Page finishes Render
ChildControl calls OnUnload
ChildControl raises Unload
ChildControl finishes OnUnload
Page calls OnUnload
Page raises Unload
Page finishes OnUnload
----- 说明:除了Init()和Unload()之外的所有事件都是从最外面到最里面被激发的
[MasterPage版]
ContentPage.PreInit
Master.Init
ContentPage.Init
ContentPage.InitComplete
ContentPage.PreLoad
ContentPage.Load
Master.Load
ContentPage.LoadComplete
ContentPage.PreRender
Master.PreRender
----- 说明:使用母版页时的特例,我们先要了解一个非常重要的知识点——母版页被处理的过程就相当于内容页中的一个控件,这个原因就是内容页中的所有控件都包含在“ContentPlaceholder”里,而ContentPlaceholder”其实就是母版页的一个子控件。现在母版页被处理的过程就相当于内容页中的一个控件,我们早先提到过,除了Init()和Unload()之外的所有事件都是从最外面到最里面被激发的,所以是先ContentPage.Load再Master.Load(Master现在是内容页中的一个子控件)。
[简化版]
OnInit
TrackViewState
OnLoad
EnsureChildControls
CreateChildControls
OnPreRender
SaveViewState
Render
RenderChildren
OnUnload
相关文章推荐
- .net学习笔记---IIS 处理模型及ASP.NET页面生命周期
- .net面试基本问题四 ASP.Net页面事件执行顺序 (网络整理)
- 【.Net码农】【目录】ASP.Net MVC开发基础学习笔记目录
- asp.net页面事件执行顺序
- asp.net页面事件执行顺序(转+原创补充) Button1_Click处理返回数据前还有其他处理!!!例如onPreLoad
- ASP.NET页面执行顺序
- ASP.NET页面执行顺序 (HttpModule,HttpHandler)
- ASP.net中页面事件的先后执行顺序
- ASP.NET页面的执行顺序 -转
- asp.net页面事件执行顺序
- .Net 我的学习之路(五) --- Asp.Net 页面状态的实现原理
- 【转】asp.net页面事件执行顺序
- ASP.NET 页面事件执行顺序
- asp.net页面事件执行顺序
- asp.net页面事件执行顺序(转)
- ASP.NET 3.5核心编程学习笔记(3):页面的生命周期
- 【ASP.NET学习笔记一】ASP.NET页面传参总结
- ASP.NET中页面及用户控件的事件执行顺序
- asp.net页面事件执行顺序
- asp.net页面事件执行顺序