简体   繁体   English

部署WSP时,Sharepoint 2010在Sharepoint站点中自动创建和添加Webpart

[英]Sharepoint 2010 Create and Add Webpart Automatically In Sharepoint Site When Deploy WSP

I'm using SharePoint 2010 and I have developed webparts at visual studio 2010. I'm already using WSP to deploy my web application into server, but still should create and add the webpart manually through SharePoint site. 我正在使用SharePoint 2010,并且已经在Visual Studio 2010中开发了Webpart。我已经在使用WSP将Web应用程序部署到服务器中,但是仍然应该通过SharePoint网站手动创建和添加Webpart。 Is there any way that we can deploy the application and automatically create and add all webparts into the site? 有什么方法可以部署应用程序并自动创建所有Web部件并将其添加到站点中?

Generally web parts are added to pages using features. 通常,Web部件是使用功能添加到页面的。 Basically you create one site collection feature to deploy web part files to web part gallery and web scope feature which adds this web parts to pages (for example default site page). 基本上,您创建一个网站集功能以将Web部件文件部署到Web部件库,并创建Web范围功能,该功能将该Web部件添加到页面(例如默认网站页面)。

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

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