MVC 接收参数数组(集合) 示例样本: public class Person { public string FirstName { get; set; } public string LastName { get; set; } ... } // ASP.NET MVC [HttpPost] public ActionResult Create(List<Person> persons) { // doSomething. }
现有基类: public class School { int name; int address; List<Student> students = new ArrayList<Student>(); } public class Student { int name; int sex; } 现在我需要通过ajax向后台传输一个包含所有学生集合的School对象: 传输的数据格式为: school: { "name" : "清华大学", &