gpt4 book ai didi

asp.net-mvc-3 - @Html.DropDownList 宽度

转载 作者:行者123 更新时间:2023-12-03 10:31:45 27 4
gpt4 key购买 nike

问:如何设置 @Html.DropDownList 的宽度(而不是在 css 中)?

@Html.DropDownList("ListId", String.Empty, new {style="width: 250px;"})  @* no go!*@

最佳答案

您应该使用 View 模型方法。然而,懒惰的出路就是给第二个参数一个空值。

@Html.DropDownList("ListId", null, new {style="width: 250px;"})

关于asp.net-mvc-3 - @Html.DropDownList 宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7615321/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com