AjaxControlToolkit 需要 ASP.NET Ajax 4.0 脚本
任何人都可以解决此问题
Microsoft JScript 运行时错误:AjaxControlToolkit 需要 ASP.NET Ajax 4.0 脚本。确保引用了正确版本的脚本。如果您使用的是 ASP.NET ScriptManager,请切换到 AjaxControlToolkit.dll 中的 ToolkitScriptManager。
我使用的是asp.net 3.5,VS 2008。我可以在AjaxControlToolKit.dll文件3.5.40412.2中看到的版本。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
检查此链接是否可以帮助您解决问题 -
http://blog.thinkoriginally.com/2010/05/03/microsoft-jscript-runtime-error-ajaxcontroltoolkit-requires-asp-net-ajax-4-0- script/
编辑:检查此链接以获取 dll 加载错误解决方案 -
http://geekswithblogs.net/LessonsLearned/archive/2008/08/21/hidden-surprises-in-.net-3.5-service-pack-1。 ASPX
Check if this link helps you resolve your issue -
http://blog.thinkoriginally.com/2010/05/03/microsoft-jscript-runtime-error-ajaxcontroltoolkit-requires-asp-net-ajax-4-0-scripts/
EDIT: Check this link for dll load error resolution -
http://geekswithblogs.net/LessonsLearned/archive/2008/08/21/hidden-surprises-in-.net-3.5-service-pack-1.aspx
尝试删除 bin 文件夹中的
Microsoft.ScriptManager.MSAjax.dll
。Try deleting
Microsoft.ScriptManager.MSAjax.dll
in the bin folder..对于遇到此问题的其他人:如果您的 bin 目录中有无法加载的程序集,即使您没有在项目中引用它们,
GetAjaxFrameworkAssemblyAttribute
也会在第一次加载时抛出异常,然后在未来的负载上无法工作(不抛出异常)。此问题可能只会偶尔发生。请参阅 Microsoft Connect 问题 和Google 网上论坛问题/解决方法讨论。所以,尽量不要把不可用的DLL塞进你的bin目录中。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.我认为你的 VS 2008 版本有问题。因为 Ajax 3.5 dll 至少需要 Visual studio service pack 1。但您可能没有 Service Pack 1,因此请安装它。
在安装 Service Pack 1 之前,从工具栏中删除 Ajax 工具包,并在安装完成后再次添加它并运行。我也遇到了同样的问题,我已经通过这种方式解决了。
I Think you have problem with your VS 2008 version. Because Ajax 3.5 dll requires minimum Visual studio service pack 1. But you may not have service pack 1. so please install it.
Before installing service pack 1 remove Ajax toolkit from toolbar and when installation complete again add it and run. I was also having the same problem and I have solved in this way.
从 bin 文件夹中删除 Microsoft.ScriptManager.MSAjax.dll 和 Microsoft.ScriptManager.WebForms.dll。这对我有用。
Delete Microsoft.ScriptManager.MSAjax.dll and Microsoft.ScriptManager.WebForms.dll from your bin folder. This worked for me.
使用AjaxControlToolkit.dll &注册通过
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
&然后代替脚本管理器使用
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>
当我在母版页上设置 ScriptManager(作为默认模板的一部分添加)时,我遇到了这个问题。
我收到错误的内容页面有一个 ToolKitScriptManager,而母版页有一个 ScriptManager。
我从母版页中删除了 ScriptManager 以消除错误。
这是一个参考页,详细介绍了两者之间的差异。
http://blog.turlov.com/2008/05/scriptmanager-vs -toolkitscriptmanager.html
希望对某人有所帮助!
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!
在搜索并尝试了许多解决方案后,这对我有用:
在projectName.csproj文件中,删除
中的我的情况:
Microsoft.ScriptManager.MSAjax.dll
。
更改为
没有任何意义,因为需要更改的标签太多after searching and trying many solutions, this works for me:
in projectName.csproj file, delete
<Folder Include="bin\" />
in<ItemGroup>
my situation:
Microsoft.ScriptManager.MSAjax.dll
in the bin folder.<asp:ScriptManager ...>
to<ajaxToolkit:ToolkitScriptManager ...>
makes no sense, because there are too many tags to change试试这个:
更改
为
Try this:
Change
to