Error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts

2 posts, 1 answers
  1. AKRAM
    AKRAM avatar
    1 posts
    Member since:
    Sep 2012

    Posted 19 Sep 2012 Link to this post


    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,
  2. Answer
    Kate avatar
    1898 posts

    Posted 24 Sep 2012 Link to this post

    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">
    <asp:ScriptReference Assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Name="MicrosoftAjax.js" Path= "~/Scripts/AjaxJS/MicrosoftAjax.js" />
    <asp:ScriptReference Assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Name="MicrosoftAjaxWebForms.js" Path="~/Scripts/AjaxJS/MicrosoftAjaxWebForms.js" />

    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,
    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.
Back to Top