I have a feature which specifies a custom user control to be added to the AdditionalPageHead delegate control as such:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Control Id="AdditionalPageHead"
Sequence="90"
ControlSrc="~/_CONTROLTEMPLATES/15/CustomUserControl.ascx" />
</Elements>
The custom user control itself just adds a script block to the page.
When this feature is activated, MDS is disabled on the site collection.
I have set [assembly: MdsCompliant(true)]
in the AssemblyInfo.cs and also added the attribute to the control.
[MdsCompliant(true)]
public partial class CustomUserControl : UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
It looks like I may need to set SPContext.Current.Web.EnableMinimalDownload
but I'm not sure where that needs to be done.
What else do I need to do to make sure activating this feature won't disable MDS?