<WebMethod()> _
Public function HelloWord() as String
return "HelloWord"
End function
返回的内容是通过XML包裹的,形如:
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="******">string</string>
改成:
<WebMethod()> _
Public sub HelloWord()
System.Web.HttpContext.Current.Response.Write("HelloWord")
End Sub
就可以去掉XML壳,直接输出HelloWord。