asp.net ajax程序设计之笔记3--ScriptManager之EnablePageMethods属性

 ScriptManager的EnablePageMethods属性用于设定客户端javascript直接调用服务端静态WebMethod

EnablePageMethods.aspx


   

        EnablePageMethods="True">
       
           
       

       

       
       
       

   

   

EnablePageMethods.aspx.cs

[System.Web.Services.WebMethod]
    public static String SayHello(string name)
    {
        return "welcome to site " + name;
    }

你可能感兴趣的:(Ajax)