This code worked (correctly reflected the user’s current timezone) back in the aspx version.
<%= Html.DropDownList("User.TimeZone", AppHelper.GetUSTimeZones(Model.TimeZone))%>
In switching to Razor I’m finding that the rendered control does not place the user’s timezone as the selected item.
I’ve reviewed this question and see that others have experienced the same issue. Shouldn’t I expect HtmlHelpers to work the same when moving to Razor?
For the overload of DropDownList you are using, the method takes a string for the field name and an IEnumerable of SelectListItem.
http://msdn.microsoft.com/en-us/library/system.web.mvc.html.selectextensions.dropdownlist.aspx
So your AppHelper.GetUSTimeZones(Model.TimeZone)) needs to return IEnumerable<SelectListItem>.
To make an option selected you need to indicate that the SelectListItem is the selected one. So something like:
Hope it helps.