我目前有一个看起来像这样的下拉列表
@Html.DropDownList("ItemID", null, "-- Select --", htmlAttributes: new { @class = "form-control chosen-select" })
这会产生一个默认值“-- Select --”
但我想更改它,因此默认值是模型中的当前 ItemID。
所以像这样
@Html.DropDownList("ItemID", null, @Model.ItemID, htmlAttributes: new { @class = "form-control chosen-select" })
我怎样才能做到这一点?