If you use @Html.DropDownList("CarList", (SelectList)ViewBag.CarNames)
, you should add CarList
to action as parameter. Or if you want to receive car value from model, you should use DropDownListFor
:
@Html.DropDownListFor(model => model.VmCarData, ViewBag.CarNames as IEnumerable<SelectListItem>, "-Select Car-", new { @id = "carDDL" })