I have a class named "AirLineSession":
public ExtendedList listCo { get; set; }
public ExtendedList listBa { get; set; }
public bool SortbyRating { get; set; }
public AirLineSession()
{
listCo = new ExtendedList();
listBa = new ExtendedList();
}
In my view I have:
@Html.HiddenFor(m => m.listBa)
@Html.HiddenFor(m => m.listCo)
@Html.DropDownListFor(a => a.SortbyRating, new[] { new SelectListItem { Text = "Sort by rating", Value = "true" }, new SelectListItem { Text = "Sort by frice", Value = "false" } })
When I summit this view, only data of SortByRating is passed to the model in Controller, listBa and listCo aren't passed. I don't know why.
Anyone help me, thanks.