控制器

ViewData["select1"] = new SelectList(b.bd(),"names","names");


视图


@Html.DropDownList("select1",null,new { @style="width:100px;height:100px;border:1px solid black"})

 posted on 2018-07-23 10:59  代码搬砖工  阅读(400)  评论(0编辑  收藏  举报