I have a strongly-typed partial view which displays output in a list format. I want to insert data from partial view in DB. I am struggling with looping through rows in partial view and sending them to controller action to be inserted in DB. Here is what i have so far

Partial:

```
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Student.Models.vwStudent>>" %>

<table>
        <tr>
            <th>
                Student ID
            </th>           
            <th>
                Past Due Amount
            </th>
            <th>
                Past Due Days
            </th>            
        </tr>

        <% if (Model != null)
           foreach (var item in Model) { %>

        <tr>
            <td>
                <%=Html.TextBox("StudentID",item.StudentID) %>
            </td>

            <td>
                <%=Html.TextBox("PastDueAmount",item.PastDueAmount) %>
            </td>
            <td>
                <%=Html.TextBox("PastDueDays",item.PastDueDays) %>
            </td>            
        </tr>

    <% } %>

    </table>

```

Here is how I access above partial in master:

```
<div>
<% using(Html.BeginForm("SaveStudentInvoice", "StudentInvoice")) %>
<% { %>
<div>
<% Html.RenderPartial("DisplayStudentInvoiceList"); %>
</div>
<% } %>
<br/>
<input type="button" id="Submit" name="Submit" value="Submit" />
</div>

```

Controller:

```
[HttpPost()]
public ActionResult SaveStudentInvoice(IEnumerable<Student.Models.vwStudent> students)
{
    DataContext db = new DataContext();

foreach(Student.Models.vwStudent student in students){

        Invoice Inv = new Invoice();
        {
            Inv.StudentID= student.StudentID;
            Inv.PastDueAmount= student.PastDueAmount;   
            Inv.PastDueDays= student.PastDueDays;                 
        };

        db.Invoices.InsertOnSubmit(Inv);
}
        db.SubmitChanges();

        return View();

}

```

In the partial view, there are more than one students listed(2,3,4.. rows). When I click "Save" button I am only able to save the first student listed in Partial (1st row), How can I loop through the remaining students listed in partial to save them?

Thanks in advance.