Avatar of Hari Shankar
Hari Shankar
Flag for India 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

{ 'code': 'INVOICE', 'From': '22/02/2017', 'To': '22/02/2017', 'InvoiceType': ['supplier'] }

Open in new window


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(); 
                         }

Open in new window

.
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
ASP.NETJSONjQuery

Avatar of undefined
Last Comment
Nitin Sontakke

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Nitin Sontakke

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck