Search code examples
ajaxcontroltoolkitdotnetnukedotnetnuke-6

Does DotNetNuke 6 support Ajax Control Toolkit?


Does anybody have successfully working module in DNN 6 with the Ajax Control Toolkit? My modules stopped working when we migrated from DNN 5.x to to 6.x. Modules compile without errors but I am getting client side script error:

'AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll'

Seems like this is conflict with Telerik's controls, according to information that I have found. But I didn't find any info how to fix it.


Solution

  • It could work together, but you'll need do some modifications to the core of DNN.

    Here the list of things to do:

    • Check that you're using latest version of .Net 4.0 binaries of AjaxControlToolkit (I was able to let it work for DNN 6.0.1 with Telerik 2011.01.519 and ACT September 2011 v4.1.50927)
    • Check that in your web.config you have assembly binding redirects for System.Web.Extensions and System.Web.Extensions.Design to the version 4.0
    • Take DNN source package, find Library\Framework\AJAX.cs, locate method AddScriptManager, instantiation of RadScriptManager in it, for the version 6.0.1 look into line 54. Add one more property initializer: EnableScriptCombine = false. Compile it (in Release configuration, of course), take DotNetNuke.dll and drop into your DNN installation.

    You should be done.

    Credits goes to Telerik support, despite it's stated there that it should work out of the box starting from 2010.1.625. Not sure, did I get them wrong, or they just reintroduced this bug.

    P.S. DNN support promises to release version 6.1.0 in November with updated Telerik controls, which should fix this issue, at least on their opinion.