这篇文章主要介绍了ASP.NET 页面中加添加用户控件的方法,需要的朋友可以参考下
一:在页面前台中添加注册控件 代码如下: <%@ Register Src="~/Controls/IndexTop.ascx" TagName="IndexTop" TagPrefix="uc_top" %> 二:在页面需要添加控件的地方添加控件内容 复制代码 代码如下: <uc_top:IndexTop ID="IndexTop1" runat="server" /> 三:新建用户控件IndexTop.ascx