I try to make a simple ajax call but out of nowhere I started printing the ajax call and it no longer comes to the webmetod and everything is correct, it did not move anything and it started to fail in that way.
Ajax code
function getRecords(idExcel, tipoFile) {
$("#IdRecords").removeClass("hidden");
$.ajax({
type: "GET",
url: "AdminView.aspx/getInforRecords",
data: '{idUpload:"' + idExcel + '",tipoFile:"' + tipoFile + '"}',
contentType: 'application/json; charset=utf-8',
dataType: "json",
success: function (result) {
return;
},
error: function (xhr, status, error) {
alert(xhr.responseText)
}
});
}
.aspx.cs code
[WebMethod]
public string getInforRecords(int idUpload,int tipoFile)
{
UploadGEOController geocont = new UploadGEOController();
List<UploadGEO> listgeo = new List<UploadGEO>();
string htmlreturn = "";
listgeo = geocont.RecordsExcel(idUpload,tipoFile);
List<UploadGEO> lstreturn = new List<UploadGEO>();
//foreach (UploadGEO elemento in listgeo)
//{
// htmlreturn += "<tr><td>" + elemento.AreaFuncional + "</td><td>" + elemento.DominioFuncional + "</td><td>" + elemento.Periodo + "</td><td>" + elemento.Proveedor + "</td>" +
// "<td> <div class='col-lg-12 text-center'><i id='ModalRecords' class='fa fa-eye' title='Aqui Usted podra ver detalles' aria-hidden='true' style='cursor:pointer;'></i></div>" +
// "" +
// "</td></tr>";
//}
lstreturn.AddRange(listgeo);
return "";
}