I have created one webservice with one method and two parameters.I call the webservice using javascript .
How to call this webservice asynchronously using javascript
Consume the Web Service Asynchronously from html javascript
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Amit ChoudharyRank #145 · 15.8K reputationPosted Jul 4, 2011, 12:54 AM EDT
Here the sample of how to it.
function InfoByDate(sDate, eDate){ var divToBeWorkedOn = '#AjaxPlaceHolder'; var webMethod = 'http://MyWebService/Web.asmx/GetInfoByDates' var parameters = "{'sDate':'" + sDate + "','eDate':'" + eDate + "'}" $.ajax({ type: "POST", url: webMethod, data: parameters, contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { $(divToBeWorkedOn).html(msg.d); }, error: function(e){ $(divToBeWorkedOn).html("Unavailable"); } }); }Thanks.