SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to add a new custom-defined DelegateControl to the bottom of my MasterPage so that I can install Google Remarketing markup to the bottom of all my pages with a Feature. I already have the feature and usercontrol deployed and activated, but it's not showing up in the DelegateControl tag that I've created. This feature also installs Google Analytics markup to the pre-existing AdditionalPageHead and is doing so correctly, so there must be some step missing in making SharePoint acknowledge my custom-defined DelegateControl.

The control is declared in my MasterPage thusly:

<SharePoint:DelegateControl ControlId="RIMS2_PageFooter" Id="RIMS2PageFooter" runat="server" AllowMultipleControls="true"/>

and the "elements.xml" file for that particular feature thusly:

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="">
    <Control Id="AdditionalPageHead" Sequence="90" ControlSrc="~/_ControlTemplates/RIMS2_Features_Google_Code/Google_Analytics.ascx" />
    <Control Id="RIMS2_PageFooter" Sequence="90" ControlSrc="~/_ControlTemplates/RIMS2_Features_Google_Code/Google_Remarketing.ascx" />
share|improve this question
After much googling, researching, reading and testing, I finally found out that, apparently, this was a two-sided issue: One being that substituting content using custom DelegateControls doesn't actually work in WSS 3.0 (my local development environment. Production environment is MOSS 2007) and secondly, the ControlId parameter doesn't allow numbers within the string (not that it generated an error to that effect). – vynsane Nov 6 '12 at 3:54
You should post your resolution as an answer and mark it as such so this question can be closed. – John Chapman Feb 15 '13 at 19:47
up vote 0 down vote accepted

I resolved this by changing the ControlId and Id parameters to strings that didn't include numbers like so:

   <SharePoint:DelegateControl AllowMultipleControls="true" ControlId="RIMS_PageFooter" ID="RIMSPageFooter" runat="server"/>

and setting the Id in the elements.xml file to reflect that change:

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="">
        <Control Id="AdditionalPageHead" Sequence="90" ControlSrc="~/_ControlTemplates/RIMS2_Features_Google_Code/Google_Analytics.ascx" />
        <Control Id="RIMS_PageFooter" Sequence="90" ControlSrc="~/_ControlTemplates/RIMS2_Features_Google_Code/Google_Remarketing.ascx" />

I was also mistaken regarding WSS not displaying custom DelegateControls - the Google Remarketing tags are showing up correctly in the pages at the root of the WSS site, where the MasterPage has been edited to include the custom DelegateControl. It is, however, not showing up on other pages because one would need to modify the MasterPage of each subweb to contain the same DelegateControl tag (uncovering one of the hidden benefits of the Publishing Services in MOSS).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.