在布局页面“文章页面中”添加,自定义UserControl

1 把UserControl如:UCCommentPart.ascx,放到如下路径下
 C:/Program Files/Common Files/Microsoft Shared/web server extensions/12/TEMPLATE/CONTROLTEMPLATES
 2 在布局页面中头中
 <%@ Register src="/_controltemplates/UCCommentPart.ascx" tagname="UCCommentPart" tagprefix="uc2" %>
 相应位置添加UserControl即可。
  <div>
  <uc2:UCCommentPart ID="UCCommentPart1" runat="server" />
 </div>
  3 注意,不能放在wpresources目录下。如:
  C:/Inetpub/wwwroot/wss/VirtualDirectories/10001/wpresources

posted @ 2009-10-22 14:50  深潭  阅读(180)  评论(0编辑  收藏  举报