ASP.NET MVC Html.DropDownListFor Select Value
I have a little problem. I am using the Html.DropDownListFor helper to display the dropdown to the client.
But I cannot set the selected value in the dropdown.
<%= Html.DropDownListFor(model => Model.CalculationClassCollection,
new SelectList(Model.CalculationClassCollection, "ID", "Name", 3 ),
new { id = "ddCalculationClass" })%>
Can anyone help me?
+2
a source to share