jquery调用webservice需要把XML数据做转换,转换成json才能用。
这样就需要在webconfig中添加:
<
httpHandlers
>
< remove verb = " * " path = " *.asmx " />
< add verb = " * " path = " *.asmx " validate = " false " type = " System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 " />
</ httpHandlers >
< remove verb = " * " path = " *.asmx " />
< add verb = " * " path = " *.asmx " validate = " false " type = " System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 " />
</ httpHandlers >