Monday, April 29, 2013

Simple jQuery PageMethod call


Simple Ajax call :

   function aa() {
            $.ajax({
                url: "Default.aspx/GetName",
                type: "POST",
                contentType: "application/json;",
                success: function(result) {
                alert(result.d);
                 }
            });
        }

1.  Sequence is not important
2.  Not all parameters are required.

using System.Web.Services;
    [WebMethod]
    public static string GetName()
    {
        return "aabb";
    }

No comments:

Post a Comment

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...