我在SharePoint 2010中構建Web部件,並且需要使用TaxonomyFieldControl進行過濾。我在項目中設置了引用(isnt'intl',v14.0.0.0),但我得到一個警告:「Element'TaxonomyFieldControl'不是已知的元素。如果出現編譯錯誤在網站中,或web.config文件丟失。「在編譯,並在運行時,我得到「未知服務器標記‘分類:TaxonomyFieldControl’」未知服務器標記'Taxonomy:TaxonomyFieldControl'
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Taxonomy" Namespace="Microsoft.SharePoint.Taxonomy" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebPart_DocumentsUserControl.ascx.cs" Inherits="Test.WebPart_Documents.WebPart_DocumentsUserControl" %>
...
<Taxonomy:TaxonomyFieldControl FieldName="TaxonomyFilter" runat="server"></Taxonomy:TaxonomyFieldControl>
這也是值得注意的是,「分類」不與智能感知出現,而且也沒有「管理工具」,但其餘做。此外在代碼隱藏,我有:
using Microsoft.SharePoint.Taxonomy;
它編譯好。
我試圖刪除每http://blog.tentaclesoftware.com/archive/2010/07/21/95.aspx
謝謝我的架構緩存!
嘗試'TaxonomyWebTaggingControl'像這樣:http://blog.hagenberg-software.at/2010/06/adding-the-taxonomy-control- to-a-custom-page/or http://pholpar.wordpress.com/2010/02/15/build-your-own-user-interface-components-using-the-taxonomy-controls/ –
does not幫助......看來Visual Studio實際上並沒有註冊Microsoft.SharePoint.Taxonomy。 – Nacht