Navigation Bar

Wednesday 5 June 2013

Provisioning WebParts to Correct zone in SharePoint 2013

If you have had scratched your head for placing a web-part in correct zone through module or code in SharePoint 2013 and did NOT find answer then this blog will help you overcome.

In SharePoint 2010, you specify zone (i.e title property of <WebPartPages:WebPartZone tag) it works fine but in SharePoint 2013 it does not like it L

After doing some digging that is added web-part to my favourite zone and tried to check what zone SharePoint assign to web-part through code and realised that SharePoint accept Id of <WebPartPages:WebPartZone tag as shown below image:

And here is the sample snippet for Module that adds web-part:

That’s it.  

1 comment:

  1. Hi Masood,

    Nice post,with samples .thanks for sharing this.

    Sharepoint Developers