I'm using FormData() to send data from my Ajax to an ASP.NET MVC controller.
The problem is I have no idea how to get this data in my controller. I successfully get file data with
var pic = System.Web.HttpContext.Current.Request.Files["MyImages"];
but I get nothing when try to do same with text values.
var data3 = new FormData();
var dtime = Date.now();
var newD = dtime.toString();
data3.append("DateTime", newD);
$.ajax({
url: "/Adopt/Tst",
type: "POST",
contentType: false,
processData: false,
data: data3,
success: function (response) {
alert("done");
console.log(response);
}
});