第一步:需要引用Web Service
第二步:配置文件:
<configuration>
<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"/>
</httpHandlers>
<system.web>
<configuration>
实例请参考:http://www.cnblogs.com/ike_li/articles/1376343.html