SharePoint

Add Web part programmatically through C#

0The code below adds a web part programmatically on to a page

Reference link: https://social.msdn.microsoft.com/Forums/office/en-US/1bc7212c-385d-4a89-9b7e-9d37ee762017/add-webpart-on-sharepoint-page-programmatically?forum=sharepointdevelopmentlegacy

SharePoint

Create a Sub Site programmatically through C# with feature activation

0Sometime we require creating a sub site programmatically. The sample code below creates a SharePoint Sub Site.

If you don’t know the GUID of the feature but you do know the name of the Feature, you have to theFeatureDefinitions collection off of the SPFarm object.  Unfortunately, you have to iterate through the whole collection and Read more about Create a Sub Site programmatically through C# with feature activation[…]