c#中ascx文件使用

来源:互联网 发布:centos syslog 编辑:程序博客网 时间:2024/05/24 03:53

<%@ Register TagPrefix="uc1" TagName="WebCtl1" Src="../WebCtl1.ascx" %>

Register指令,在aspx页头引用ascx文件。
 
 
TagPrefix 属性 获取指定控件的标记前缀。
TagName 获取 HTML 标记的名称。
 
使用在html代码中 嵌入

<td><uc1:webctl1 id="WFC1" runat="server"></uc1:webctl1></td>

原创粉丝点击