I have this annoying problem where my DropDownlist doesn\'t select the current value by default.
Controller:
var YearsCycling = new SelectList(new Li
Just ensure that the variable name set on ViewBag is different to the name assigned to the dropdownlist - i.e. don't do:
Controller:
ViewBag.CityId = new SelectList(....)
View:
@Html.DropDownList("CityId", ...
Just use a different viewbag variable name.
I've had problems when using the same ViewBag variable name as a html control name with drop down lists and listboxes.