I have list of string and i have a selected item among those strings.
Controller:
ViewBag.GroupName = new SelectList(Names, Names.Find(s=>s==Place.GroupName));
View:
@Html.DropDownListFor(model => model.GroupName, (IEnumerable<SelectListItem>)ViewBag.GroupName)
But the selection on the view is always the first item in the list which is not as expected. What could be the problem.