当前位置: 代码迷 >> ASP.NET >> petshop中关于用户控件有关问题
  详细解决方案

petshop中关于用户控件有关问题

热度:7110   发布时间:2013-02-26 00:00:00.0
petshop中关于用户控件问题
petshop   中controls\productscontrol.ascx,在设计器中,有一个customlist-productslist,是用户控件吧。那么它是怎么跑到设计器上去的?

本人初学.net、petshop,特希望高人指点

------解决方案--------------------------------------------------------
在页面上注册一下就可以使用用户控件了
<%@Register src= "controls\productscontrol.ascx " TagName= "myUserControl " Prefix= "pf " %>
使用的时候: <pf:myUserControl id= "usercontrolID " runat= "server "> <pf:myUserControl />
------解决方案--------------------------------------------------------
在同一个项目下,编译后就上去了。
不同项目下,添加引用。
还有可以从选项卡上右键附加。