这已经变得非常复杂了,我怀疑自己能否独立处理。从一开始就有很多事情涉及到项目中,我不确定它们是做什么的。
我已经将AjaxControlToolkit添加到项目中,并使用类似设置Script Manager的方式:
<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,请切换到AjaxControlToolkit.dll中的ToolkitScriptManager。 ScriptResource.axd:19
我在Scripts文件夹中找到了许多不同的脚本,没有提供与AjaxControlToolkit一起使用的脚本,现在我不知道如何解决这个问题?