我有一个表单和 Html.DropDownList 。表单提交后,下拉列表状态更改为默认值。表单提交后如何保持下拉列表状态?
@using (Html.BeginForm("Result", "Controller", FormMethod.Post, new { id = "Form" }))
{
@Html.DropDownListFor(x => x.DropList, new[] {
new SelectListItem() {Text = "first", Value = "first"},
new SelectListItem() {Text = "second", Value = "second"},
new SelectListItem() {Text = "third", Value = "third"}
}, "DefaultState")
提前致谢。