$.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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
ranjitha ranju2 reputationPosted Mar 19, 2015, 10:33 PM EDT
Example:-
Refer:- calling web service in asp.net using jquery
Suraj SahooRank #382 · 6.6K reputationPosted Mar 19, 2015, 10:37 PM EDT
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) {
}
});