Thursday, May 20, 2010

AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts

If you are using Dynamic data controls and if you get the following error?

Microsoft JScript runtime 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 AjaxScriptManager in System.Web.Ajax.dll, or use the ToolkitScriptManager in AjaxControlToolkit.dll.

Solution

Are you using ScriptManager or ToolkitScript manager? You need to use the ToolkitScriptManager in order for the new AJAX Toolkit to work.

Change
<asp:ScriptManager ID="ScriptManager1" runat="server" />

to

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>

No comments:

Post a Comment