ASP.NET ASPX 页面CodeFile与CodeBehind的区别
ASP.NET ASPX 页面CodeFile与CodeBehind的区别
CodeBehind 指定包含与页关联的类的已编译文件的名称。该属性不能在运行时使用。 Specifies the name of the compiled file that contains the class associated with the control. This attribute is not used at run time. 指定包含与页关联的类的已编译文件的名称,编译完后所有cs中的代码打包进dll.该属性不能在运行时使用.提供此属性是为了与以前版本的 ASP.NET 的兼容,以实现代码隐藏功能。 CodeFile 指定指向页引用的代码隐藏文件的路径。此属性与 Inherits 属性一起使用可以将代码隐藏源文件与网页相关联。此属性仅对编译的页有效。比如VS2005中新建一个网站你会发现编译比WEB应用程序慢很多,但是可以修改代码后不用整体编译刷新页面就可以看到效果. Specifies a path to the referenced code-behind file for the control. This attribute is used together with the Inherits attribute to associate a code-behind source file with a user control. The attribute is valid only for compiled controls. ASP.NET编译网站报错:未能加载类型.Global.asax,把CodeBehind改为CodeFile即可
参考文档:
WCF与Web Service的区别与关系 接口和抽象类的区别 String与StringBuilder的区别 控件与组件的区别(Control&Component的区别) C#.Net 关键字ref和out的区别 C#.Net前台线程与后台线程的区别 C#.Net值类型和引用类型区别 C#打开CHM文件并定位到指定的页面(原创) 数据查询页面支持TreeList展示数据 IIS7 经典模式和集成模式的区别 WebService, WCF, WebApi 的区别与应用|C/S框架网推荐文档 Application.ExitThread,Application.Exit的区别 ASP.NET Web Forms - HTML 页面 ASP.NET编译网站报错:未能加载类型.Global.asax,把CodeBehind改为CodeFile即可 .NET Framework V4.0版本经典模式和集成模式的区别 - 阿里云虚拟主机.NET版本设置
其它资料:
什么是C/S结构? | C/S框架核心组成部分 | C/S框架-WebService部署图 | C/S框架-权限管理 | C/S结构系统框架 - 5.1旗舰版介绍 | C/S结构系统框架 - 功能介绍 | C/S结构系统框架 - 产品列表 | C/S结构系统框架 - 应用展示(图) | 三层体系架构详解 | C/S架构轻量级快速开发框架 | C/S框架网客户案例 | WebApi快速开发框架 | C/S框架代码生成器 | 用户授权注册软件系统 | 版本自动升级软件 | 数据库底层应用框架 | CSFramework.CMS内容管理系统 | |