簡體   English   中英

將web控件添加到sharepoint 2013中的母版頁

[英]Add web control to master page in sharepoint 2013

我正在嘗試將SharePoint網站從2010升級到2013版。

我的母版頁中有一個Web控件,我實際上無法在sharepoint 2013中工作。

我已經在類文件中構建了Web控件並將dll部署到Web應用程序,因此它出現在C:\\ inetpub \\ wwwroot \\ wss \\ VirtualDirectories \\ 80 \\ bin中

然后我編輯了頁面頂部添加的默認母版頁。

<!--SPM:<%@ Register TagPrefix="Gnie" Namespace="GNIE.SharePoint.Core.Branding"Assembly="GNIE.SharePoint.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=aad712380eccafda" %>-->

我已將控件添加到母版頁中

<div> <!--SPM:<Gnie:TaxonomyNavigationControl ID="taxnav" ListName="Documents" FieldName="Technical Document Type" runat="server" />--> </div>

Web控制代碼非常標准

namespace GNIE.SharePoint.Core.Branding

{
    [DefaultProperty("Text")]

[ToolboxData("<{0}:TaxonomyNavigationControl runat=server></{0}:TaxonomyNavigationControl>")]

public class TaxonomyNavigationControl : WebControl

/*code here */

}`

當我嘗試在sharepoint中查看頁面時,我收到錯誤消息稱未知服務器標記'Gnie:TaxonomyNavigationControl'

嘗試替換:

<!--SPM:<Gnie:TaxonomyNavigationControl ID="taxnav" ListName="Documents" FieldName="Technical Document Type" runat="server" />-->

附:

<!--MS:<Gnie:TaxonomyNavigationControl ID="taxnav" ListName="Documents" FieldName="Technical Document Type" runat="server" >-->
<!--ME:<Gnie:TaxonomyNavigationControl>-->

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM