I am making simple ajax post call like
$(document).on("submit", function () {
var formdata = new FormData($('form').get(0));
$.ajax({
url: '@Url.Action("addCustomerTesting", "Auto")',
type: 'POST',
data: formdata,
success: function (result) {
alert("test");
if (result != false) {
alert("test");
}
},
error: function () {
alert("test");
$(".loading-ajax").hide();
}
});
});
In response I get an .json file, ajax success method not receiving the response result. I have the action is as follows
[HttpPost]
public ActionResult addCustomerTesting(AddCustomerVM model, HttpPostedFileBase[] CustomerDocuments)
{
return Json(new { result = 0, message = "Success" }, JsonRequestBehavior.AllowGet);
}