在我看来,当我这样做时,下拉列表会正确显示 -
@Html.DropDownListFor(m => m.SelectedEstimateState, Model.EstimateStateList.ToSelectList(c => c.Value, c => c.Text), new { });
但不是当我这样做时 -
@{
Html.DropDownListFor(m => m.SelectedEstimateState, Model.EstimateStateList.ToSelectList(c => c.Value, c => c.Text), new { });
}
两者有什么区别?