我在模型中有 5 个值(代码 1、2、3、4、5),并将代码 5 分配为默认值。它正在拾取第一个值,即 1。我用过Model.Eobadlstatus.Select(n => n.Code = 5)
@Html.DropDownListFor(m => m.EbAdlAmbulationCd,
new SelectList(Model.Eobadlstatus,
"Code",
"Description",
Model.EbAdlAmbulationCd),
Model.Eobadlstatus.Select(n => n.Code = 5) )