c# - 未知服务器标签 'Taxonomy:TaxonomyFieldControl'

标签 c# asp.net .net sharepoint

我正在 SharePoint 2010 中构建 Web 部件,并且需要使用 TaxonomyFieldControl 进行筛选。我已在项目中设置了引用(不是“intl”的引用,v14.0.0.0),但收到警告:“元素“TaxonomyFieldControl”不是已知元素。如果存在编译错误,则可能会发生这种情况网站中,或者 web.config 文件丢失。”在编译时,在运行时我得到“未知服务器标记'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>

还值得注意的是,“Taxonomy”不会与 Intellisense 一起出现,“Utilities”也不会出现,但其余的都会出现。同样在后面的代码中,我有:

using Microsoft.SharePoint.Taxonomy;

编译得很好。

我已尝试按照 http://blog.tentaclesoftware.com/archive/2010/07/21/95.aspx 删除我的架构缓存

谢谢!

最佳答案

您注册了错误的程序集。而不是:

<%@ Register TagPrefix="Taxonomy" Namespace="Microsoft.SharePoint.Taxonomy"
             Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral,
                       PublicKeyToken=71e9bce111e9429c" %> 

尝试:

<%@ Register TagPrefix="Taxonomy" Namespace="Microsoft.SharePoint.Taxonomy"
             Assembly="Microsoft.SharePoint.Taxonomy, Version=14.0.0.0, Culture=neutral,
                       PublicKeyToken=71e9bce111e9429c" %>

关于c# - 未知服务器标签 'Taxonomy:TaxonomyFieldControl',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7683842/

相关文章:

c# - 使用 WSFederationHttpBinding 的性能非常差

javascript - 如何在 vs 2010 中为 dbpedia 在 javascript 中运行 sparql 查询以获得抽象?

c# - 聊天 - 获取新消息可用性的最佳方式

c# - 以下代码中 protected 内部访问说明符的意义

c# - 哪种数据结构适合临时存储大二进制数据?

java - VB .NET 的计算方式与 Java 不同

.net - 在 Delphi XE2 中使用 .NET 程序集

c# - Entity Framework 不保存/停止重建数据库

c# - 如何将泛型类型导出到 COM?类型库导出器在签名中遇到泛型类型实例

c# - 如何列出所有月份名称,例如组合?