易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

在asp.net webservice中如何使用session

 
在使用asp.net编写webservice时,默认情况下是不支持session的,但我们可以把WebMethod的EnableSession选项设为true来显式的打开它,请看以下例子:
1 新建网站WebSite 
2 新建web服务WebService.asmx,它具有以下两个方法:
 C#-Code:
[WebMethod(EnableSession = true)]
public string Login( ......

ASP.NET 运行机制总结


ASP.NET 运行机制总结
     这些天看了一些关于ASP.NET底层的文章,受益匪浅。
     为什么要了解这些底层呢?我觉得做为一个喜欢开发ASP.NET程序员,我不们不仅要知道“怎么做”,我们更应该知道“为什么这么做”,这样的我们才能做得更好。这 ......

ASP.NET读取ASP设置的Cookie

    这类问题通常在整合或二次开发ASP网站时遇到。按常理来说,浏览器的Cookie存放在客户端,实际上与服务端使用什么语言无关,但我们在实际操作过程中,总会遇到一些意想不到的问题。
    1. 当ASP写的Cookie的Key中带有下划线,例如我们在ASP中这样设置Cookie:
     ......

ASP.NET的Web.config文件中可配置哪些身份验证方式

http://rzchina.net/node/3210
Web.config文件中可配置的身份验证方式有Windows、Forms、PassPort、None。
Web.config文件中<authentication>节点,身份验证方式取决于该节点“mode”属性的设置。
1.None
None表示不执行身份验证。
2.Windows
IIS根据应用程序的设置执行身份验证,其中包含匿名身份 ......

ASP.net 自制TableTree实现

using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
namespace UserControl.UI
{
 /// <summary>
 /// TreesTable 的摘要说明。
 /// </summary>
 public class TreesTable
 {
  public interface iTrees ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号