Jquery Ajax Default MVC
$.ajax({
type: 'POST',
url: "@Url.Action("GetCariList")",
data: { param1: "value1", param2: "value2" },
dataType: 'json',
success: function (result) {
console.log(result);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log("Status: " + textStatus); alert("Error: " + errorThrown);
},
complete: function (result) {
console.log(result);
}});
// data: JSON.stringify({
// 'ECZANEADI': ecz, 'CLCARDREF': ref, 'ADSOYAD': as, 'TCKIMLIKNO': tc, 'DTARIH': dt, 'FUARSAYISI': '', 'YAS': yas, 'GALADURUM': status
// }),
// contentType: "application/json; charset=utf-8",
// }).done(function (msg) {
// console.log(msg);
// })
//.fail(function() {
//console.log( "error" ); })
//.always(function() {
//console.log( "complete" ); });