在.net2.0中我们在使用AJax的时候,有可能会出现不起作用,仍然还是刷新的效果,

而且还会提示Microsoft JScript 运行时错误: 'Sys' 未定义解决方案的错误,可以采用下面的方法解决

解决方案是向项目所在webconfig 的<system.web>节点里面的最后一节添加如下代码:

<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

</httpHandlers>

<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</httpModules>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2022-02-12
  • 2021-06-13
  • 2022-01-21
  • 2022-02-19
猜你喜欢
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
  • 2021-08-11
  • 2021-10-30
相关资源
相似解决方案