0
我在模型中有5個值(代碼1,2,3,4,5),並將代碼5分配爲默認值。這是拿起第一個值是1。我用Model.Eobadlstatus.Select(n => n.Code = 5)
@ Html.DropDownListFor沒有選擇默認值
@Html.DropDownListFor(m => m.EbAdlAmbulationCd,
new SelectList(Model.Eobadlstatus,
"Code",
"Description",
Model.EbAdlAmbulationCd),
Model.Eobadlstatus.Select(n => n.Code = 5))
是「Model.Eobadlstatus.Select(n => n.Code = 5)」它在代碼中的方式嗎?如果它不是「Model.Eobadlstatus.Select(n => n.Code == 5)」? – TNCodeMonkey