0

I have posted my class below and with sample data. I need to pass this class as an json response.

[Serializable]
public class Student
{
    public string Fname {get;set;}
    public string FirstSemMarkcsv {get;set;}  //This should hold marks as comma separated values.
    public string SecondSemMarkcsv {get;set;}  //This should hold marks as comma separated values.
}

Sample Data

Fname     FirstSemMark       SecondSemMark
John               95                  90
John               80                  93
John               70                  80
Peter              60                  78
Peter              80                  80
Peter              90                  85

I need to pass this as json response.

Any thoughts please.

Regards,

Ashish

ashish.chotalia
  • 3,696
  • 27
  • 28

1 Answers1

2
List<Student> students = GetStudentList();
return Json(students));
Steve Mallory
  • 4,245
  • 1
  • 28
  • 31