I am trying to pass a IEnumerable model parameter from one method to another however when I debug the code the parameter is not being passed even though the method signature is the same.
I've tried with and without the Bind Prefix
Method 1:
[HttpPost]
public ActionResult Create_Filter([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<CourseFilterViewModel> courseFilterVM)
{
return RedirectToAction("Course", "Filter", courseFilterVM);
}
Method 2:
public ActionResult Course([Bind(Prefix = "models")]IEnumerable<CourseFilterViewModel> courseFilterVM)
{
return View(courseFilterVM);
}
I am expecting the entire model to be passed but instead I am getting a null value.