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:

How to detect Copy Cut and Paste actions on Textbox in JQuery

$("#<%=Textbox1.ClientID %>").bind('cut copy paste', function(e)
{     alert(e.type + ' text!'); });