In this post I’ll show how to create a simple (but own) delegate control.
A short intro and links on delegate controls can be found on sharepointoverflow.
Take a look on master page. There are already many delegate controls. The delegate control with id AdditionalPageHead can be used for adding your script or jQuery library.:
You can also override existing controls like searchbox. But what if you want to add some content in the master page where no delegate controls are present. Of course, you can add it directly to the master page. Perhaps not on all webs? You can use placeholders to manage it. But do you want to update all the page layouts?
So the solution is to use delegate controls, for adding multiple pieces of content or overriding using Sequence. In this example I’ll add some new content to the quicklaunch bottom area:
Now we’ll create a brand new delegate control. Just add it after ContentTemplate:
In your Visual Studio project add a mapped folder for CONTROLTEMPLATES and add a new user control: MyText.
Just write some text in the user control.
Add a new empty element:
Reference to your user control in the elements.xml file:
<?xml version="1.0" encoding="utf-8"?>
Now deploy to your site and see the difference:
This is just a simple tutorial which shows how to start developing a custom delegate control, only for demonstration purpose only. No formatting or good solution design have been payed attention.
Here is the original s4-leftpanel section from v4 without v3 ui versioned controls:
Read more of this post