If you’ve made the transition from DotNetNuke 6 to DotNetNuke 7 you’ve probably discovered that the AJAX Toolkit controls don’t play nice with DotNetNuke any more. Fortunately the Telerik AJAX controls have been bundled with DotNetNuke for version 7. I’ve discovered that converting to the Telerik controls has been beneficial and worth the upgrade.
Still, it can be a pain getting the code right. One particular error that I ran into today was the Registered Script Control error. It looks something like this:
"Script control ‘{controlname}’ is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors(). Parameter name: scriptControl"

The error results from “stacked” AJAX controls. Consider the following HTML
<%@ Register TagPrefix=”dnnui” Namespace=”DotNetNuke.Web.UI.WebControls” Assembly=”DotNetNuke.Web” %>
<%@ Register TagPrefix=”DNN” Namespace=”DotNetNuke.UI.WebControls” Assembly=”DotNetNuke.WebControls” %>
<DNN:DNNTabStrip ID=”tabsProject” runat=”server” TabRenderMode=”All” Visible=”true”>
<DNN:DNNTab runat=”server” Label-Text=”Properties” ID=”tabGeneral”>
<dnnui:DnnAjaxPanel runat=”server” ID=”dapMain”>
<asp:Label runat=”server” ID=”lblInfo”></asp:Label>
</dnnui:DnnAjaxPanel>
</DNN:DNNTab>
<DNN:DNNTab runat=”server” Label-Text=”Properties” ID=”tabSecond”>
<dnnui:DnnAjaxPanel runat=”server” ID=”dapSecond”>
<asp:Label runat=”server” ID=”lblMessage”></asp:Label>
</dnnui:DnnAjaxPanel>
</DNN:DNNTab>
</DNN:DNNTabStrip>
Let’s say that the second tab (tabSecond) should only appear under certain conditions; a record was created, a particular user is logged, whatever the condition is doesn’t matter, just that the tab should appear at certain times and not appear at other times.
In the code behind the condition block might look like this:
if (condition) then
tabSecond.Visible = False
end if
But this results in the Registered Script Control error. Modify the condition block this way:
if (condition) then
dapSecond.EnableAJAX = False
tabSecond.Visible = False
end if
This should resolve the error
What was the issue? I’m glad you asked.
The issue causing the error is that AJAX controls are registered with the AJAX script manager and cannot be unregistered, or moved. Hiding an AJAX control is equivalent to moving it from the script. In order to circumvent that we’re disabling AJAX on the control before it has a chance to be rendered and registered with the script manager.
Best Recommended DotNetNuke Hosting
ASPHostPortal.com is the leading provider of Windows hosting and affordable DotNetNuke Hosting. DotNetNuke Hosting from ASPHostPortal.com provides a safe, reliable and performance-driven foundation for your DotNetNuke website. DotNetNuke is the perfect Content Management System for managing and developing your website with one of ASPHostPortal’s Hosting plans. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.