asp.net控件开发学习(1)

在学习 Clingingboy 的 asp.net控件开发基础(1)  时
http://www.cnblogs.com/Clingingboy/archive/2006/07/30/463471.html

在使用控件时

(1).需要先注册一下

<%@ Register TagPrefix="custom" Namespace="CustomComponents" %>

(2) 然后就使用标签输出效果

<custom:CreditCardForm1 runat="server" ID="ccf" />

这种方法在vs2005sp1中不能正常使用,提示找不到

然后
我在 web.config 中
  <pages theme="Maxthon">
   <controls>
    <add tagPrefix="data" namespace="Wxy.NetTiers.Web.Data" assembly="Wxy.NetTiers.Web"/>
    <add tagPrefix="data" namespace="Wxy.NetTiers.Web.UI" assembly="Wxy.NetTiers.Web"/>
    <add tagPrefix="wxy" namespace="Wxy.Web.WebCustomControl" assembly="Wxy.Web.WebCustomControl"/>
   </controls>
  </pages>
上面加黄的一句,终于可以使用了,不知道什么原因

原文地址:https://www.cnblogs.com/shiningrise/p/764546.html