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的,但我们可以把WebMethod的EnableSession选项设为true来显式的打开它,请看以下例子:
1 新建网站WebSite
2 新建web服务WebService.asmx,它具有以下两个方法:
C#-Code:
[WebMethod(EnableSession = true)]
public string Login( ......
ASP.NET 运行机制总结
这些天看了一些关于ASP.NET底层的文章,受益匪浅。
为什么要了解这些底层呢?我觉得做为一个喜欢开发ASP.NET程序员,我不们不仅要知道“怎么做”,我们更应该知道“为什么这么做”,这样的我们才能做得更好。这 ......
http://rzchina.net/node/3210
Web.config文件中可配置的身份验证方式有Windows、Forms、PassPort、None。
Web.config文件中<authentication>节点,身份验证方式取决于该节点“mode”属性的设置。
1.None
None表示不执行身份验证。
2.Windows
IIS根据应用程序的设置执行身份验证,其中包含匿名身份 ......
ASP.NET 安全认证(一)—— 如何运用 Form 表单认证
ASP.NET 安全认证(二)——灵活运用 Form 表单认证中的 deny 与 allow 及保护 .htm 等文件
ASP.NET 安全认证(三) ——用Form 表单认证实现单点登录(Single Sign On)
ASP.NET 安全认证(四)Form 认证的补充 ......
在中文VS2008中安装ASP.NET MVC框架,首先需要下载mvc框架
点这里下载,目前版本为Preview 2
运行文件AspNetMVCPreview2-setup.msi进行安装,安装完成后发现在VS2008里面并没有MVC模板出现。又到处Google了一遍,发现有不少人遇到这个问题,但是还没看到完全解决的办法。
目前遇到问题的基本集中在Microsoft Visual Studio ......