【发布时间】:2013-12-02 23:20:42
【问题描述】:
这已经很复杂了,我怀疑我是否可以单独处理它。现在有很多东西从一开始就包含在项目中,我不确定它们是什么以及它们是什么。
我已将 AjaxControlToolkit 添加到项目中并用于设置脚本管理器:
<ajaxToolkit:ToolkitScriptManager runat="server"
EnablePageMethods="true"
EnablePartialRendering="true"
LoadScriptsBeforeUI="true"
AjaxFrameworkMode="Enabled">
<Scripts>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="MsAjaxBundle" />
<asp:ScriptReference Name="respond" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
</Scripts>
</ajaxToolkit:ToolkitScriptManager>
看起来像 ajaxToolkit 形式的东西已经可以工作,但大多数情况下我在 Chrome 控制台中看到错误。
但我看到的第一个错误是:
未捕获的错误:AjaxControlToolkit 需要 ASP.NET Ajax 4.0 脚本。 确保引用了正确版本的脚本。如果你是 使用 ASP.NET ScriptManager,切换到 ToolkitScriptManager AjaxControlToolkit.dll。 ScriptResource.axd:19
我在 Scripts 文件夹中发现了很多不同的脚本,但 AjaxControlToolkit 没有提供,现在我不明白如何解决它?
【问题讨论】:
-
@Sam 谢谢,timscyclingblog.wordpress.com/2013/03/22/… 真的很有帮助。您可以将其设置为答案吗?
标签: c# asp.net ajax asp.net-ajax ajaxcontroltoolkit