AjaxControlToolkit requires ASP.NET Ajax 4.0 scrip

2019-02-13 06:14发布

Can anyone have a solution for this issue

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 ToolkitScriptManager in AjaxControlToolkit.dll.

I am using asp.net 3.5, VS 2008. The version i can see in the AjaxControlToolKit.dll file 3.5.40412.2.

8条回答
不美不萌又怎样
2楼-- · 2019-02-13 06:47

I ran into this issue when I had a ScriptManager set up on my master page that was added as part of the default template.

The content page I was getting the error on had a ToolKitScriptManager and the master page had the ScriptManager.

I removed the ScriptManager from the master page to get rid of the error.

Here's a reference page detailing the differences between the 2. http://blog.turlov.com/2008/05/scriptmanager-vs-toolkitscriptmanager.html

Hope that helps someone!

查看更多
太酷不给撩
3楼-- · 2019-02-13 06:55

Use AjaxControlToolkit.dll & register it by
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

& then instead of script manager use
<cc1:ToolkitScriptManager runat="server"></cc1:ToolkitScriptManager>

查看更多
淡お忘
4楼-- · 2019-02-13 07:00

Try this:

Change

<asp:ScriptManager ID="scriptManager1" runat="server"></asp:ScriptManager> 

to

<ajaxToolkit:ToolkitScriptManager ID="toolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager> 
查看更多
虎瘦雄心在
5楼-- · 2019-02-13 07:02

Try deleting Microsoft.ScriptManager.MSAjax.dll in the bin folder..

查看更多
Bombasti
6楼-- · 2019-02-13 07:02

Delete Microsoft.ScriptManager.MSAjax.dll and Microsoft.ScriptManager.WebForms.dll from your bin folder. This worked for me.

查看更多
爱情/是我丢掉的垃圾
7楼-- · 2019-02-13 07:07

For others hitting this problem: if you have assemblies in your bin directory that cannot be loaded, even if you do not reference them in your project, GetAjaxFrameworkAssemblyAttribute will throw an exception the first time it is loaded, then fail to work (without throwing an exception) on future loads. This issue may only happen sporadically. See Microsoft Connect Issue and Google Groups issue/work-around discussion . So, try not to stuff unusable DLLs in your bin directory.

查看更多
登录 后发表回答