开发者

CSS in HTML Helper - only override width on certain HTML Helpers

开发者 https://www.devze.com 2023-02-07 18:32 出处:网络
<%= Html.DropDownListFor(m => m.ResetDayComponent.WeightedAverageMethodID, DropDownData.AveragingMethodList(), \"\", new { @class = \"multipleReset\", propertyName = \"ResetDayComponent.Weighted
<%= Html.DropDownListFor(m => m.ResetDayComponent.WeightedAverageMethodID, DropDownData.AveragingMethodList(), "", new { @class = "multipleReset", propertyName = "ResetDayComponent.WeightedAverageMethodID", onchange = "UpdateField(this);" })%>

So I have this HTML Helper. Basically, I want to be able to change the width of the dropdown, but other ones that use the same CSS class multipleReset, I don't want to do it. I basically want to be able to have sort of a C开发者_高级运维SS "parameter". But I don't know if that's possible.


You can always add a second CSS class, and provide the additional style information there.

@class = "multipleReset dropDown"
0

精彩评论

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