我有以下代码 aDropDownListFor
并且工作正常
@Html.DropDownListFor(Function(model) model.Habilitacoes, New SelectList(ViewBag.Habilitacoes, "KeyHL", "DescricaoHL"), New With {.class = "FillHSpace"})
是ViewBag.Habilitacoes
一个List(Of T)
但是知道我想添加SelectedValue
到 中DropDownListFor
,所以我使用了以下代码但不起作用。
@Html.DropDownListFor(Function(model) model.Habilitacoes, New SelectList(ViewBag.Habilitacoes, "KeyHL", "DescricaoHL", model.Habilitacoes), New With {.class = "FillHSpace"})
我该如何申报SelectedValue
?