Adding Webpart using Client Object Model in SharePoint 2013
Have you ever had a deployed solution from one environment to other i.e Development to Staging or Staging to Production, so you have noticed that it requires lot of manual works to configure whole solution to work perfectly the way we have expected it to work. Consider a situation having a solution containing lot of webparts and we have to add them manually on pages, quite a cumbersome task and everybody hates to do it. So to cope up with these kind situations we can automate the process of adding webpart to a page. In this article I'm going to explain how to add webpart programmatically using CSOM. Creating config file To start the automation process first we need to create a configuration file, an excel or csv will do work. This configuration file will store the data on which page which webpart need to be added with some other information. Below the screenshot: PageName: webpart page name. ZoneId: Webpart zone name. Order: Order of webpart i...