将OOTB Web部件添加到SharePoint应用程序

时间:2014-10-23 19:46:07

标签: search sharepoint sharepoint-apps webpartpage

我试图在使用Office 365开发站点进行开发的App for SharePoint中添加OOTB Web部件(实际上是为了创建搜索页面的变体),但这种情况发生在任何OOTB Web部件上。我创建页面时的默认代码是:

<%@ Page language="C#" MasterPageFile="~masterurl/default.master"
    Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, 
    Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, 
    PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" 
    Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, 
    PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" 
    Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, 
    PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
  <SharePoint:ScriptLink name="sp.js" runat="server" OnDemand="true" 
      LoadAfterUI="true" Localizable="false" />
</asp:Content>

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
  <WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" 
      ID="full" Title="loc:full" />
</asp:Content>

我只是想将SearchArea Web部件添加到区域中我总是在测试中得到这个: &#34;无法为此Web部件创建XmlSerializer&#34;

这看起来很简单,但我总是遇到这个错误。这基本上发生在任何OOTB Web部件上。我究竟做错了什么?同样,我只有一个App for SharePoint,它将部署大量定制的搜索体验,但必须在某些区域使用OOTB SharePoint控件进行搜索。

思想?

0 个答案:

没有答案