As the title says really
<td><%= Html.DropDownList("Weight", Model.Weightddl.Select(x => new SelectListItem { Text = x.Name, Value = x.Id.ToString() }))%></td>
Here is my line of code. I have the value Model.Weight which I want to have preselected on the load… How can I set it as the selected value?
thanks
Steve
Set the
Selectedproperty, like this: