2

我有从SharePoint Designer创建的“数据视图Web部件”。我将Web部件作为“Web部件”添加到了我的Visual Studio项目中。我想知道如何将Web部件添加到应用程序页面。将Web部件添加到应用程序页面

回答

4

嗨,我知道它晚了,但今天我不得不做同样的事情,所以我在sharepoint.stackexchange.com上做了一个很好的回答。但基本上就像在APS.NET页面上添加任何其他的asp.net控件。

首先,您需要定义前缀,装配

<%@ Register tagprefix="prefix" namespace="NameSpaceOfTheWebPart" assembly="FullAssemblyName" %> 

例如:使用必要的属性

<%@ Register tagprefix="csm" namespace="MySolution.VisualWebPart" assembly="MySolution Version=1.0.0.0, Culture=neutral, PublicKeyToken=335eef5f6f60e56b" %> 

,然后将Web部件添加到页面(在主占位符)由asp.net(ID和runat)。

<prefix:WebPartClassName ID="ID" runat="server" /> 

的唯一的事情是,你将不能够通过浏览器来编辑页面,修改Web部件,如果需要修改Web部件的任何其他财产,你将不得不从做背后的HTML或代码。

这里是链接我也跟着的网址: https://sharepoint.stackexchange.com/questions/26508/is-it-possible-to-add-web-parts-to-an-application-page

我希望它能帮助。

相关问题