NET MVC 1.0.
I use
ViewData['DeptID'] = new SelectList(DeptID, 'ID', 'Name', course.DeptID);
where I am passing the selected value DeptID as forth parameter, but it doesn’t work. When I debug, then the above selection list is correct with the selected value.
I use
<%= Html.DropDownList('DeptID', (SelectList)ViewData['DeptID']) %>
in the view.
Try just using:
Here is an article about it.