易截截图软件、单文件、免安装、纯绿色、仅160KB

ASp.NET 2.0中Page事件的执行顺序

Page 执行中将按照如下顺序激活事件:
Page.PreInit
Page.Init
Page.InitComplite
Page.PreLoad
Page.Load
Page.LoadComplete
Page.PreRender
Page.PreRenderComplete
如果页面从令一个页面继承,如BasePage:System.Web.UI.Page,在BasePage中做了一些扩展,如权限检查,而其他页面从BasePage继承,则BasePage和最终Page的事件激活顺序是:
UI.PreInit
Page.PreInit
UI.Init
Page.Init
UI.InitComplite
Page.InitComplite
UI.PreLoad
Page.PreLoad
UI.Load
Page.Load
UI.LoadComplete
Page.LoadComplete
UI.PreRender
Page.PreRender
UI.PreRenderComplete
Page.PreRenderComplete
如果使用了MasterPage,则MasterPage中的事件和ContentPage中的事件按照下面顺序激活:
ContentPage.PreInit
Master.Init
ContentPage.Init
ContentPage.InitComplite
ContentPage.PreLoad
ContentPage.Load
Master.Load
ContentPage.LoadComplete
ContentPage.PreRender
Master.PreRender
ContentPage.PreRenderComplete
更进一步,如果ContentPage继承BasePage,那么,各事件的执行顺序将变成:
UI.PreInit
ContentPage.PreInit
Master.Init
UI.Init
ContentPage.Init
UI.InitComplite
ContentPage.InitComplite
UI.PreLoad
ContentPage.PreLoad
UI.Load
ContentPage.Load
Master.Load
UI.LoadComplete
ContentPage.LoadComplete
UI.PreRender
ContentPage.PreRender
Master.PreRender
UI.PreRenderComplete
ContentPage.PreRenderComplete


相关文档:

Socket通信未完成,自学ASP.NET小有成效,初识Ajax

进去寒假,由于一个浑浑噩噩的学期结束了,不想令自己继续沉溺在那昏天黑地之中,于是去Library借了一本很厚很重的C# ASP.NET的书,附光盘。有趣的,我用历来学习课本知识的放学学习C#和熟悉VS环境,还做了不少读书笔记,哎,真的没那个必要啊,不过看了1-2周之后,对于服务器端控件的确是熟悉不少,对于边边脚脚的一些页面 ......

在ASP.NET中web.config配置数据库

大家知道在网站的每个页面上,存储一些全局处理信息,理想的做法是将这些信息一次性的集中存储在资料档案库中,而不是在网站的每个页面上都重复这样的操作。
    比如说数据库连接串就是这样的信息,如果这些信息不是集中存储在特定区域中,而是在网站的每个需要连接数据库的页面上手工输入,可以设想:当数 ......

使用asp.net FtpWebRequest 实现FTP常用功能

以下代码 使用.net FtpWebRequest 实现FTP的常用功能, 代码已经调试通过, 可复制直接使用。 经测试使用此种方式实现的FTP操作与直接使用命令的方式操作FTP要稳定许多。 有设计不好的地方请指正。

using System;
RYWo})E[3K Tg0using System.Collections.Generic;
}k'LQ BB-_d0using System.Text;ITPUB ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号