1)ScriptManager的EnablePageMethods属性用于设定客户端javascript直接调用服务端静态WebMethod
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods=true>
</asp:ScriptManager>
</asp:ScriptManager>
[System.Web.Services.WebMethod]
public static String SayHello(string name)
{
return "welcome to site " + name;
}
public static String SayHello(string name)
{
return "welcome to site " + name;
}