Hari Shankar
asked on
why JSON Array data not binding on Model ASP.NET ?
Hi Experts,
Its hard to figure out why some format of JSON data binds and why other not . Here is my JSON data
and Model Class File
But what am getting is always null on the InvoiceType field and other field are binding perfectly.
Please give some best resource for model binding
Thanks in Advance Experts
Its hard to figure out why some format of JSON data binds and why other not . Here is my JSON data
{ 'code': 'INVOICE', 'From': '22/02/2017', 'To': '22/02/2017', 'InvoiceType': ['supplier'] }
and Model Class File
public class InvoiceInput
{
public string code { get; set; }
public string From { get; set; }
public string To { get; set; }
public List InvoiceType = new List();
}
. But what am getting is always null on the InvoiceType field and other field are binding perfectly.
Please give some best resource for model binding
Thanks in Advance Experts
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.