C# MVC @Html.DropDownListFor对简单的下拉列表的匿名类构造方法

 @Html.DropDownListFor(m=>m.Recommend,new SelectList(new[]{ new { value = 0, text = "" },new { value = 1, text = "" } }, "value", "text", 0),new { @class = "form-control" })

 

posted @ 2022-10-21 10:31  James·wang  阅读(140)  评论(0编辑  收藏  举报