开发者

Width of the Dropdown on ASP.NET MVC View Page

开发者 https://www.devze.com 2022-12-18 02:32 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号