将类添加到 html.dropdownlist 后,我面临以下错误。
错误: “System.Web.Mvc.HtmlHelper”不包含“DropDownList”的定义和最佳扩展方法重载“System.Web.Mvc.Html.SelectExtensions.DropDownList(System.Web.Mvc.HtmlHelper, string, string )' 有一些无效的参数
<li>
@Html.LabelFor(m => m.BuildType)
@Html.DropDownList("BuildType", new { @class = "BuildType" })
@Html.ValidationMessageFor(m => m.BuildType)
</li>
<li>@Html.LabelFor(m => m.BuildMode)
@Html.DropDownList("BuildMode", new { @class = "BuildMode" })
@Html.ValidationMessageFor(m => m.BuildMode) </li>
<li>