In controller I obtain StudentID from POST method from a View. Basically the line is:
public ActionResult Edit(int? StudentID) {}
In the View, I have a hidden field to provide the StudentID. What would be the reason that in View() when I changed the line:
using(Html.BeginForm()) { //... }
to
using (Html.BeginForm("Edit", "Students", FormMethod.Post, new { @class = "form-horizontal" }))
the ModelBinder stops binding StudentID. When I submit the form I receive null instead of correct Student's ID.