Hi all,
function DisplayMessageCall() {
var pageUrl = '<%=ResolveUrl("http://192.168.141.43//MCHWebservice//CallService.asmx")%>'
$.ajax({
type: "Get",
url: pageUrl + "/TestHTML",
data: '{}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccessCall,
error: OnErrorCall
});
}
function OnSuccessCall() {
alert("success");
}
function OnErrorCall(response) {
alert("Failure");
}
Here,
I am trying to call TestHTML method, which returns the values in the format of XML.
and i am trying to run the above code but everytime i am getting failure message.


Satyapriya NayakRank #47 · 31.5K reputationPosted Jun 7, 2012, 6:51 AM EDT
Please refer the below link
http://www.c-sharpcorner.com/UploadFile/sapnabeniwal/consuming-asp-net-web-service-through-jquery/
Thanks
SIVARank #2,303 · 613 reputationPosted Jun 7, 2012, 7:10 AM EDT
Venkatesh KumarRank #539 · 4.5K reputationPosted Aug 18, 2012, 9:46 PM EDT
If you are try to call a HTML page, if its same domain as we call directly. or its different domain we need to check the alternatives.
http://www.codeproject.com/Articles/78757/Making-Cross-Domain-jQuery-AJAX-Calls
if you return JSON format , we can try the below getJSON API:
http://api.jquery.com/jQuery.getJSON/
Akkiraju IvaturiRank #473 · 5.3K reputationPosted Aug 18, 2012, 9:53 PM EDT
http://www.codeproject.com/Articles/349598/Introduction-to-using-jQuery-with-Web-Services