Hi Good Afternoon!
I have created webservice in new project
public string GetProductsJson(string prefix)which is returning Json data
and I am calling that webservice by using jquery like this from another project
$.ajax({
type: "POST",
url:"http://localhost:3904/Service1.asmx/GetProductsJson",
data: "{'prefix':'" + $(this).val() + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
crossDomain:true,
success: function(response) {
},
error: function(request, status, error) {
alert(request.responseText);
}
});
I have used different-different url
http://localhost:3904/Service1.asmx/GetProductsJson
http://localhost:3904/Service1.asmx?GetProductsJson
http://localhost:3904/Service1.asmx?op=GetProductsJson
but I am not getting any response.
If I put Service & Client code in single project then it works fine.
Please help me..
-Dattatrya Moin