I have the ajax call below which will do a POST to give me the below data
self.present_conditions = "[{"Township":"12","Range":"21","Section":"111","Acres":"19"}]"
var data = ko.toJSON(self.present_conditions());
$.ajax({
type: "POST",
url: "/Home/PBHEP",
contentType: "application/json; charset=utf-8",
data: data
}).done(function () {
alert("Data Saved");
});
I want to receive this data on my server side at the action result below but I always end up with null value.
[HttpPost]
public ActionResult PBHEP(string[] data)
{
return View();
}
What should I do here to get that array onto the server side.
Thank you in advance.