您的位置:首页 > 编程语言 > ASP

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.

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: