C# MVC Html.DropDownList htmlAttributes 增加 data_options

C# MVC Html.DropDownList htmlAttributes 增加 data_options


1.data-options 换成 data_options 验证可行

@Html.DropDownList("wk_Type", ViewBag.wk_Type as IEnumerable<SelectListItem>, new {  @data_options = "editable:false",@class = "easyui-combobox",  style = "width: 150px;" })

2. 验证可行

@Html.DropDownList("wk_Type", ViewBag.wk_Type as IEnumerable<SelectListItem>, new Dictionary<string, object>() { { "class", "easyui-combobox" }, { "style", "width: 150px;" }, { "data-options", "editable:false" } })


posted @ 2021-01-05 13:16  不要摸我的腰  阅读(213)  评论(0编辑  收藏  举报