Здравствуйте. Я пытаюсь отфильтровать по статусу выпуска на своих страницах индекса выпадающий фильтр, но при нажатии кнопки «Процесс» страницы не будут фильтроваться ...
Что я здесь не так делаю?
Страница указателя с кнопкой фильтра
Вид:
@using (@Html.BeginForm("Index", "Home", FormMethod.Post, new { @class =
"FilterForm" }))
{
<table>
<tr>
<th>
@Html.DropDownList("GraduationStatus",
null, htmlAttributes: new { @class = "form-control" })
</th>
<th>
<button type="submit" class="btn btn-
primary btn-lg"> Process !</button>
</th>
</tr>
</table>
}
Контроллер:
public ActionResult Index(string graduationStatus)
{
ViewBag.GraduationStatus = new SelectList(db.Graduated_Students.Select(m => m.GraduationStatus).Distinct().ToList());
var graduates = db.Graduated_Students.Where(student => student.GraduationStatus != null);
return View(graduates.ToList());
}