I have many site collections, where I want to add a webpart page named "reporting.aspx" and insert a developped webpart (c#) in it, How can I create this feature and activate it automatically ? thank you.
1 Answer
The best way you can add page with your web part is using Module.
I am sharing some links here like SharePoint-deploy-webpart-page-using-module and Quick-tip-provisioning-web-parts-to-a-page which shows you how to Create page using module.
Add this module in one feature and activate it in all site collection where you want this page.
-
thanks @SID , I found this link, but I have a custom webpart so where should I search for my webpart name to call it ? in this line <metaData> <type name="WebpartPages.MyWebpart.MyWebpart, WebpartPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=132122a1200767d5" /> <importErrorMessage>Cannot import this Web Part.</importErrorMessage> </metaData> Commented Sep 2, 2016 at 11:16
-
Sorry for late reply.. You can find your <metaData> of webpart information from .webpart file of your webpart from visual studio..– SIDCommented Sep 5, 2016 at 11:37