Width of the Dropdown on ASP.NET MVC View Page
I am wondering h开发者_如何转开发ow we can set the width of the Dropdown. When i write the below line of code, I am getting compilation error.
Appreciate your responses.
<%= Html.DropDownList("product", (SelectList) ViewData["product"], new { style = "width: 300px;"})%>
because I think ViewData["product"] is considered as object so its thinks it is the overload html attributes
精彩评论