在我的应用程序中我想将类从第一个更改为第二个,例如取决于成绩的数据条目。
<div class="editor-label">
@Html.LabelFor(model => model.Class)
</div>
<div class="editor-field">
@Html.DropDownListFor(model => model.Class, new SelectList(new[] { "1st grade", "2nd grade", "3rd grade" }))
@Html.ValidationMessageFor(model => model.Class)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.grade)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.grade)
@Html.ValidationMessageFor(model => model.grade)
</div>