How to use ajax call in jquery
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
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
Sai SherlekarRank #1,392 · 1.2K reputationPosted Jul 3, 2014, 3:00 AM EDT
$.ajax({
url: "abc.aspx/GetCustomer",
data: "{'prefixText':'" + "Your Textbox Value" + "'}",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
success: function (data) {
//call ur function after success
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
});
write webmethod as per below
[WebMethod]
public static string GetItemAttributeList(string prefixText)
{
return "Hello World";
}
Gurunatha Dogi44 reputationPosted Jul 15, 2014, 2:43 AM EDT
Check the article link below. It gives complete information on implementing jQuery.ajax in php with source code.
http://www.onlinebuff.com/article_select-insert-update-and-delete-using-jquery-ajax-animation-effects-in-php_43.html