我该如何调用此功能?
public static HtmlString DropdownForEnum<TModel>(this HtmlHelper<TModel> helper, Type type,
string name, string optionLabel, object htmlAttributes)
Run Code Online (Sandbox Code Playgroud)
在页面内(使用剃刀语法):
@Html.DropDownForEnum(typeof(enumToDropDown), name: "Foo", optionLable: "Bar", htmlAttributes: null)
Run Code Online (Sandbox Code Playgroud)