Skip to main content

Thinking out aloud - Dave Hunter's SharePoint Blog

Go Search
Home
Blog
  

Locations of visitors to this page


 Useful Links

  Microsoft UK events
  SharePoint 2007 on CodePlex
  SharePoint Community Portal
  SharePoint User Group
  SharePoint Community Portal
  SharePoint Pedia
  SharePoint MSDN Forums
  SharePoint University
Home > Thinking out aloud - Dave Hunter's SharePoint Blog > Posts > Hosting UserControls vs Delegate Control
My thoughts and findings on Microsoft Information worker technologies, including MCMS and SharePoint 2007 (MOSS).
Hosting UserControls vs Delegate Control

There are two main approaches for adding user controls to your site:

  1. Deploying them to the "wpresources" folder
  2. Using the DelegateControl

Many people have blogged about each technique, but which is the best or the recommended approach?

Tony Rahbun has posted an article called "WebParticles: Developing and Using Web User Controls as WebParts in Microsoft Office SharePoint Server 2007" http://www.codeproject.com/spoint/WebParticles.asp.

Microsoft's recommended approach is to use the DelegateControl. http://msdn2.microsoft.com/en-us/library/ms463169.aspx.

Advantages of using the DelegateControl over hosting UserControls in the wpresources folder

  • Using Solution deployment in SharePoint 2007 you can create a WSP to automate the deployment of your UserControls (stored in the ControlTemplates folder) and Features (used to activate a DelegateControl).
  • You can control the scope of the feature.
  • More closely integrated with SharePoint.
  • If the feature isn't activated the DelegateControl will fall over gracefully. This would enable the component to be hidden if no longer needed.
  Copyright
This work is licenced under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 UK: England & Wales License
  Site Map

Comments

There are no comments yet for this post.

 Dave Hunter

I'm currently a Senior Consultant at Netstore 2e2. I specialise in Microsoft Information Worker technologies (especially MOSS, MCMS and .NET), with over 8 years of experience within this area of specialism. 

I have gained two certifications for MOSS and WSS and look to complete the full certification track soon.

View Dave Hunter's profile on LinkedIn

  Subscribe in a reader


 Latest Posts

I’ve been Awarded a MVP for SharePoint01/04/2010 19:49
SharePoint 2010 Training on Microsoft E-Learning15/03/2010 17:56
SharePoint UK User Group - Thursday 27th August London Meeting25/08/2009 17:56
CAML Query that filters on the current user23/07/2009 17:50
Microsoft Ramp Up Free SharePoint Developer Training22/07/2009 20:59
How To: Change a SharePoint Application Pool Programmatically07/07/2009 18:08
SharePoint Forums Topping 100 Answers06/07/2009 12:29
Find out the SharePoint Internal Name for a Column or Site Column28/05/2009 09:56
Delving into Deploying SharePoint Artifacts with Features24/04/2009 15:20
SharePoint - Connecting MySites with the Portal24/04/2009 14:39
1 - 10 Next