Question

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?

Was it helpful?

Solution

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

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top