Hello Community,
i use asp.net mvc 2 and i have a problem with the DropDownListFor helper. My ViewModel contains a SelectList with all required Values und 1 SelectedValue. When i use the DropDownListFor helper in my View the SelectedValue is not selected! Then i select a other Value and submit the form, on the next rendering in the PostedValue selected. What is the problem on the first Rendering?
<%=Html.LabelFor(m => m.Test)%>
<%=Html.DropDownListFor(m => m.Test, Model.TestList, new { tabindex = 1, @class = "selectbox" })%>
<%=Html.ValidationMessageFor(m => m.Test, null, new {@class = "text-hide", id = "Error-Test"})%>