$.ajax({
type: "POST",
contentType: "application/json",
url: "WebEmployee.asmx/employeeDetails",
success: function (data) {
//sucess function
},
error: function () {
//error
}
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suraj SahooPosted Mar 20, 2015, 2:37 AM
Please try the below code. This will surely be of help.
$.ajax({
type: "POST",
url: "WebEmployee.asmx/employeeDetails",
data: "{}",
dataType: "json",
contentType: "application/xml; charset=utf-8",
success: function (data)
{
alert(data);
},
error:
function (xhr) {
}
});
ranjitha ranjuPosted Mar 20, 2015, 2:33 AM
Example:-
Refer:- calling web service in asp.net using jquery