edrp.cn的Blog

学习,需要交流,欢迎大家和我共同来学习C#,ASP.NET,MS SQL Server开发Web项目,欢迎大家和我交流

博客园 首页 新随笔 联系 订阅 管理
ASP.NET1.0和ASP.NET1.1没有App_Code功能,使用自己定义的控件时,需要@Register 指令:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="WebApplication1.WebForm1" %><%@ Register TagPrefix="WebApp" Namespace="WebApplication1" Assembly = "WebApplication1" %>
然后在页面中使用:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="WebApplication1.WebForm1" %><WebApp:myControl runat="server" ID="myControl1" />

如果有多个页面使用时需要在Web.config中配置一下,接下来再学习一下<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="WebApplication1.WebForm1" %>
posted on 2007-02-15 18:39  edrp.cn  阅读(435)  评论(0编辑  收藏  举报