是否可以在助手Html.DropDownListFor创建的Select中显示所有选项?
当您单击选择以显示所有手动触发的选项时,我正在搜索触发的事件,但是我没有找到它。
@Html.DropDownListFor(
model => model.Value,
Model.Values,
htmlAttributes: new { @class = "form-control", @style = "width:150px;" })
答案 0 :(得分:0)
尝试使用ListBoxFor
@Html.ListBoxFor(model=>model.Id,model.Values as SelectList)