Tuesday, January 18, 2011

How to call asp.net web service from Jquery?

        $.ajax({

            type: "POST",

            contentType: "application/json; charset=utf-8",

            url: '<%=ResolveClientUrl("~/WebServices/example.asmx/Method")%>',

            data: "{'parameter1':'" + parametervalue1 + "'}",

            dataType: "json",

            async: false,

            success: function (data) {alert(data.d);}

        });
 
Reference:

No comments:

Post a Comment