possible duplicate Passing A List Of Objects Into An MVC Controller Method Using jQuery Ajax
but my question is when I pass
var things = [
{employee:'test',effectiveDate:'',expirationDate:'' },
{ employee:'test',effectiveDate:'',expirationDate:'' }
];
$.ajax({
contentType: 'application/json',
type: "POST",
url: "/MyController/CheckMethod",
dataType: "json",
data: JSON.stringify(things),
async: false,
success: function (data) {
to an controller method which is a [HTTPPOPST] JsonResult
then I'm getting value
into my List<MYMODEL>
but when I take a controller method as 'ActionResult'
then i'm getting null
in List<MYMODEL>
why so any thing wrong?
JsonResult
andActionResult
. Show me both the controller methods?