What does Error : "Toolkit requires ASP.NET Ajax 4.0 scripts .. " means?
What to know what the "Error: Toolkit 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" means and how to resolve it. This article shows how to resolve this error.
Error: Toolkit 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.
Lets see how to resolve this error.
Scenario:
I was trying to implement AutoCompleteExtender control of AJAX in my Web Application. I have checked the following things to make sure that the AutoComplete dropdown works.
1.I ensured that I use the WebMethod attribute to the method which is called to fill the autocomplete drop down.
2. To allow this Web Service to be called from script, using ASP.NET AJAX, I also used the below line above the class which has the web method.
[System.Web.Script.Services.ScriptService]
2. Since I was using latest version of ajaxcontroltoolkit.dll and the .NET Framework 4.0. I was using ToolkitScriptManager instead of ScriptManager as follows:
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager>
but to my disappointment after hours of try, I got the same above error. Then I realised that it was trying to load some old dlls which were referenced in the project. So I removed all the dlls which are not required by my application. Then when I ran the application again it was working fine and I was happy to see the dropdown using the AutoCompleteExtender control without any errors.