Answer the question
In order to leave comments, you need to log in
Why is JSON data not being parsed?
There is a JS code that sends data to the controller
function () {
console.log(JSON.stringify(allPoint));
$.ajax({
type: "POST",
data: JSON.stringify(allPoint),
url: "/Gis/SavePoint",
success: function () {
}
});
}
public ActionResult SavePoint(List<NewPoint> allPoint)
{
return View();
}
public class NewPoint
{
public string X { get; set; }
public string Y { get; set; }
}
[{"X":456,"Y":208},{"X":238,"Y":183},{"X":280,"Y":263},{"X":360,"Y":253}]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question