@Html.EditorFor(x=> item.Enabled)
It's been pointed out many times that posting such a model back to server will not work in mvc by default.
For properly editing with EditorFor
in a loop - for
should be used as in:
@for(var i = 0; i< Model.Users.Count;i++){
Html.EditorFor(i=>Model.Users[i])
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…