Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

My question is regarding the delegate control AdditionalPageHead, as we know it allows multple controls to be loaded.

My questions are:

  • How to add multiple controls?
  • I want that the different controls are activated by different future.

Example: I have first.ascx which is deployed with site scoped feature1 and i have a second.ascx which is deployed with site scope feature2.

Is it possible so that the second.ascx is added to the first.ascx or the other way around?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

In feature 1 have an elements.xml with:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">  
  <Control Id="AdditionalPageHead" 
           Sequence="90"             
           ControlSrc="~/_CONTROLTEMPLATES/XXX/first.ascx" />
</Elements>

In feature 2 have an elements.xml with:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">  
  <Control Id="AdditionalPageHead" 
           Sequence="91"             
           ControlSrc="~/_CONTROLTEMPLATES/YYY/second.ascx" />
</Elements>

Sequence controls the order

share|improve this answer
add comment

Im taking a shot in the dark here and presume this is for 2010

http://littletalk.wordpress.com/2010/11/18/create-an-additionalpagehead-control-packed-into-a-feature-in-visual-studio-2010/

hope it helps :)

share|improve this answer
add comment

Your Answer

 
discard

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.