I want to add background color to this drop down.. how can I do this.. I tried adding new{style="background-color: #fff;"} to the below code.. but this does not seem to working..
<%=Html.DropDownList("dd",
new List<SelectListItem>
{
new SelectListItem{ Text="dd1", Value = "dd1" },
new SelectListItem{ Text="dd2", Value = "dd2" }
}
, new { onchange = "jsfunc()" }
)%>
I tried:
<%=Html.DropDownList("dd",
new List<SelectListItem>
{
new SelectListItem{ Text="dd1", Value = "dd1" },
new SelectListItem{ Text="dd2", Value = "dd2" }
}
, new { onchange = "jsfunc()" }
, new {style="background-color: #fff;"}
)%>