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
相关文档:
一. 使用QueryString变量
QueryString是一种非常简单也是使用比较多的一种传值方式,但是它将传递的值显示在浏览器的地址栏中,如果是传递一个或多个安全性要求不高或是结构简单的数值时,可以使用这个方法。
Response.Redirect( "target.aspx?param1=hello& ......
Parameter Queries in ASP.NET with MS Access
A selection of code samples for executing queries against MS Access using parameters.
Making use of the ASP.NET 2.0 datasource controls is fine, but it is important to understand how to manually create data access code. Best practice dictates that, at t ......
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.Office.Inter ......
环境:ASP.NET(C#),Visual Studio 2010。
提示:未能加载类型“EMS.App_Code.PersonalInfo”。如果该类型位于App_Code文件夹中,请检查它是否已编译。如果该类型位于已编译的程序集中,请检查该程序集是否被该项目引用。
处理:
自己做得一个小程序,取名EMS,并在App_Code文件夹下建立了类PersonalInfo、Sal ......
公司交给我个项目,已经完成了一部分,需要做中英文双语言,以前听别人说程序多语言什么的,都不知道从哪下手得。项目架构已经搭好了,大概看了一下,知道是使用资源文件来实现的,不说了,赶紧自己试试吧。试了才会记住,才是自己的O(∩_∩)O~
1. 新建Asp.net Web应用程序ChangeLanuage,新建aspx页面Defau ......