This is a migrated thread and some comments may be shown as answers.

Error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts

1 Answer 348 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
AKRAM
Top achievements
Rank 1
AKRAM asked on 19 Sep 2012, 03:54 PM
Hello,

We are planning to buy the telerik packages. Therefore, I downloaded the ASP .NET AJAX pacakge and made an intergration test. Unfortunatly I got the following error when the page is loaded "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."

We are using the latest build of AjaxControlToolkit from CodePlex (.NET 3.5) in an ASP .NET 3.5 application. The page wich throws the error contains a ModalPopupExtender control from the AjaxToolkit.

After many searching on the forums, I found that the solution is to add MicrosoftAjax.js and MicrosoftAjaxWebForms.js in order to help the RadScriptManager to load the scripts needed by the AjaxToolkit.

I've tried this solution but unfortunatly, it didn't work. I also downloaded many samples in the forums regarding this issue but they didn't worked and folks on the related forums like this one seems to face the same issue with the samples/fixes provided.

Leaving the AjaxToolkit is not an option because it's used on many pages and doing that will require a lot of work.

Would it be possible to provide a fix or a sample application with the modalPopupExtender (ASP .NET 3.5) working please?

Kind regards,

1 Answer, 1 is accepted

Sort by
0
Accepted
Kate
Telerik team
answered on 24 Sep 2012, 10:17 AM
Hi AKRAM,

Indeed there is a compatibility issue when using the AjaxControlToolkit in a combination with the  RadControls. Please try adding the MSAjax*.js as mentioned in AjaxToolkit.40 sample and see if this will resolve the issue from your side (as it does for most of the cases):
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Name="MicrosoftAjax.js" Path= "~/Scripts/AjaxJS/MicrosoftAjax.js" />
<asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Name="MicrosoftAjaxWebForms.js" Path="~/Scripts/AjaxJS/MicrosoftAjaxWebForms.js" />
</Scripts>
</telerik:RadScriptManager>

Bottom line is, AjaxControlToolkit requires a custom script manager and it seems they have introduced breaking changes in the work of the standard ASP.NET ScriptManager by loading custom versions of the AJAX client scripts. Therefore, to ensure proper operation of Telerik RadControls with the AjaxToolkit, you need to use the standard ScriptManager control and explicitly load the  load scripts that the toolkit needs.

Please give it a try and let me know if this helps.

Kind regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
General Discussions
Asked by
AKRAM
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or