1
votes

I'm new to SharePoint 2010 development and I was wondering if it was possible to add the new "Visual Web Part" to a masterpage. In 2007, I would create a user control and put the ascx reference in the masterpage. Should I continue to do the same thing for 2010 or I can I use the Visual Web Part prototype to do the same thing?

1

1 Answers

4
votes

A Web Part is just a control that can be placed on a page (via a Web Part Zone) by an end user rather than a developer. But it's still a control. So, as a developer, if you want to place it on a page (or master page) at design time, you can do that.

However, if this web part is only going to be used on the master page, then you might want to continue using a custom user control like you did in SharePoint 2007. There is no need to have the extra overhead of making it available to end users if it is only meant to be used once on the master page.