I am using X-Editable Plugin in Asp.net with jquery Datatables to edit my table. I'm using jQuery $.ajax() Method to make a call to a method in the controller but it's not hitting that method when this function is called. Anyone know how to work jQuery $.ajax() Method?
$('#example').dataTable();
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$('td', nRow).wrapInner('<a class="xediable-example" href="#"></a>').editable({
type: 'text',
pk: 1,
name: 'test',
url: function (params) {
var urlj = "TestMethod"
return $.ajax({
type: 'POST',
url: urlj,
data: JSON.stringify(params),
contentType: 'application/json; charset=utf-8',
dataType: 'json',
async: false,
cache: false,
timeout: 10000,
});
}
});
return nRow;
}
});
Control method:
public static string TestMethod(string name, string pk, string value)
{
return "" ;
}
Error message :
Erreur du serveur dans l'application '/'.La ressource est introuvable. Description : HTTP 404. La ressource recherchée (ou l'une de ses dépendances) a peut-être été supprimée ou renommée ou bien elle n'est plus disponible temporairement. Vérifiez l'URL ci-après et assurez-vous qu'elle est correcte. URL demandée: /H41_TitreConge/TestMethod Informations sur la version : Version Microsoft .NET Framework :4.0.30319; Version ASP.NET :4.0.30319.17929