ASP.NET 2.0 页面编译方式
2007-03-01 20:30
405 查看
转自MSDN
The code-behind file contains a partial class that inherits from a base page class. The base page class can be the Page class, or it can be another class that derives from Page.
The .aspx file contains an Inherits attribute in the @ Page directive that points to the code-behind partial class.
When the page is compiled, ASP.NET generates a partial class based on the .aspx file; this class is a partial class of the code-behind class file. The generated partial class file contains declarations for the page's controls. This partial class enables your code-behind file to be used as part of a complete class without requiring you to declare the controls explicitly.
Finally, ASP.NET generates another class that inherits from the class generated in Step 3. This second generated class contains the code required to build the page. The second generated class and the code-behind class are compiled into an assembly that runs to render output to the browser.
The code-behind file contains a partial class that inherits from a base page class. The base page class can be the Page class, or it can be another class that derives from Page.
The .aspx file contains an Inherits attribute in the @ Page directive that points to the code-behind partial class.
When the page is compiled, ASP.NET generates a partial class based on the .aspx file; this class is a partial class of the code-behind class file. The generated partial class file contains declarations for the page's controls. This partial class enables your code-behind file to be used as part of a complete class without requiring you to declare the controls explicitly.
Finally, ASP.NET generates another class that inherits from the class generated in Step 3. This second generated class contains the code required to build the page. The second generated class and the code-behind class are compiled into an assembly that runs to render output to the browser.
相关文章推荐
- ASP.NET 2.0 Beta2中页面编译模型的变化
- asp.net富文本提交(不使用2.0请求方式,不禁用页面检查)
- ASP.NET 2.0页面编译
- ASP.NET 2.0 Beta2 关于页面编译模型变化的两篇文章
- ASP.NET 2.0 Beta2 关于页面编译模型变化的两篇文章
- asp.net 2.0 页面即时编译UML示意图
- ASP.NET 2.0 Beta2中页面编译模型的变化
- ASP.NET 2.0 Beta2中页面编译模型的变化(转自涂曙光博客)
- ASP.NET 2.0 Beta2中页面编译模型的变化
- 大家在发布ASP.NET 2.0的系统时需要了解的ASP.NET 2.0的3种编译方式
- ASP.NET 2.0 Beta2中页面编译模型的变化
- ASP.NET 2.0中实现跨页面提交
- 记录一次bug。asp.net 编译后 页面一刷新就报错,在刷新就正常。 (vs2005)
- ASP.NET 2.0的编译模型
- 在ASP.NET 2.0中使用页面导航控件(原作)
- .NET 1.1中预编译ASP.NET页面实现原理浅析 [1] 自动预编译机制浅析
- 学习笔记18 复习asp.net页面传参数的几种方式
- ASP.NET四种页面导航方式之比较与选择
- ASP.NET页面之间传递值的几种方式
- 详解ASP.NET 页面之间传值的几种方式