passing Json Array to MVC Controller Action returning Null .
**controler***
public class TestData
{
public string name1 { get; set; }
public string value1 { get; set; }
}
public JsonResult MyMethod(List<TestData> testVal)
{
//testval object having name1 and value1 null values
}
view page
$.getJSON("/viewFolderName/MyMethod",
{
testVal: [{ name1: "veea", value1: "0" }]
},
function (data) {
//result
});
passing Json Array to MVC Controller Action returning Null