Crystalball

导航

2012年11月6日 #

CodeFile与CodeBehind的区别

摘要: 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指定指向页引用的 阅读全文

posted @ 2012-11-06 11:54 Crystalball 阅读(186) 评论(0) 推荐(0) 编辑

解决”双击前台页面按钮没有进入后台.cs页面,而是直接进入.aspx的源代码页“的方法

摘要: 1.aspx页:头代码<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="asp.net登录和注册.Login" %>2.cs页头部代码:using System.Web;//(剩略。。)namespace asp.net登录和注册{ public partial class Login : System.Web.UI.Page { }}解释:namespace 名字空间名称{ public p 阅读全文

posted @ 2012-11-06 11:41 Crystalball 阅读(861) 评论(0) 推荐(0) 编辑