Andrew Connell

HOWTO: add web parts to site definitions

Once you build a web part, it's easy to add it to a SharePoint page. Just open the web part toolpane browser and drag it into a web part zone. But what if you want to force this web part on ALL pages that use that site definition? This is similar to to the custom navigation component I built for SPS (plan a post dedicated to it when I roll off my project) that replaces the left-hand vertical out of the box navigation. Jan just posted a great article outlining how to do this. Great job Jan! » How to Add a Webpart to a Site Definition Page By the way, I didn't embed a web part into the site definition pages for my navigation... instead I used a vanilla ASP.NET user control because it was needed in some other non-Sharepoint apps as well....

Once you build a web part, it’s easy to add it to a SharePoint page. Just open the web part toolpane browser and drag it into a web part zone. But what if you want to force this web part on ALL pages that use that site definition? This is similar to to the custom navigation component I built for SPS (plan a post dedicated to it when I roll off my project) that replaces the left-hand vertical out of the box navigation.

Jan just posted a great article outlining how to do this. Great job Jan !

» How to Add a Webpart to a Site Definition Page

By the way, I didn’t embed a web part into the site definition pages for my navigation… instead I used a vanilla ASP.NET user control because it was needed in some other non-Sharepoint apps as well.

Andrew Connell
Founder & Chief Course Artisan, Voitanos LLC. | Microsoft MVP
Written by Andrew Connell

Andrew Connell is a web developer with a focus on Microsoft Azure & Microsoft 365. He’s received Microsoft’s MVP award every year since 2005 and has helped thousands of developers through the various courses he’s authored & taught. Andrew’s the founder of Voitanos and is dedicated to delivering industry-leading on-demand video training to professional developers. He lives with his wife & two kids in Florida.