Hi,
I've a mark entry view where view is looped and constructed from studentmarks Model of list of students.
Below is my model:
public class StudentMarks
{
public List
}
public class MarkEntry
{
public int StudentId { get; set; }
public string StudentName { get; set; }
public List
}
public class SubjectList
{
public int SubjectId { get; set; }
public string SubjectName { get; set; }
public decimal MaxMark { get; set; }
public decimal ObtainedMark { get; set; }
}
My view looks below:
| Student Id | Student Name | @item[0].SubjectName |
|---|---|---|
| @Html.DisplayFor(x => x.MarksList[i].StudentId) | @Html.DisplayFor(x => x.MarksList[i].StudentName) | @Html.TextBoxFor(x => x.Subjects[i].ObtainedMark) |
Now, when I try to insert these values, in controller I get only first row textbox values. I'm not getting entire model with data as list.
How to solve this?

Answers
Know the answer? Post it. Somebody with the same question will find it here.