简体   繁体   English

在将WebPart添加到SharePoint 2010中的页面之前,先对其进行配置

[英]Configure the WebPart before add it to a page in the SharePoint 2010

I have an issue: gather configuration of the WebPart before add it to a page. 我有一个问题:在将WebPart添加到页面之前收集WebPart的配置。 For instance, the Silverlight Web Part has the same behaviour. 例如,Silverlight Web部件具有相同的行为。 It show modal dialog with asking to enter path to .xap file. 它显示模式对话框,要求输入.xap文件的路径。

The enviroment is SharePoint Foundation/Server 2010. 环境是SharePoint Foundation / Server 2010。

I hope that you has already solved this problem. 希望您已经解决了这个问题。 Please share you solution, whever is has been solved or not. 请与您分享解决方案,无论解决方案是否成功。

Thanks. 谢谢。

Web parts properties and configuration are stored in the web parts .dwp file which is just an xml file. Web部件的属性和配置存储在Web部件.dwp文件中,该文件只是一个xml文件。

You can manually setup your web part then export the .dwp file via the web part menu. 您可以手动设置Web部件,然后通过Web部件菜单导出.dwp文件。 If you examine it in a text editor you will be able to identify the configuration. 如果您在文本编辑器中检查它,则可以识别配置。

You can then import the pre-configured web parts .dwp file using the Add new web part link (can't give you exact instructions as you didn't specify SharePoint 2007 or 2010) or you can import it into the web part gallery so it will be automatically used with "Add new web part" 然后,您可以使用“添加新的Web部件”链接导入预配置的Web部件.dwp文件(由于未指定SharePoint 2007或2010,因此无法提供确切的说明),也可以将其导入到Web部件库中。它将自动与“添加新的Web部件”一起使用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM