I had create .asmx webservice in asp.net projects. my doubts that is this able to use this webservice in sharepoint project?
suppose this is my code
source: function (request, response) {
$.ajax({
url: "http://localhost:54946/VishalSir/UserName.asmx/FetchEmailList?callback=",
data: "{ 'mail': '" + request.term + "' }",
dataType: "json",
type: "POST",
crossDomain: true,
contentType: "application/json; charset=utf-8",
dataFilter: function (data) { return data; },
success: function (data) {
response($.map(data.d, function (item) {
return {
value: item.Email
}
}))
},
its works in .net project but i have taken Add Service references in sharepoint projects use this script but its not work.. pl give me direction?