Search code examples
asp.net-mvc-4dropdownlistfor

@Html.DropDownListFor; How to set different background color for each item in DDL?


I have a dropdown list (@html.DropDownListFor) wherein I am showing name of colors... I want to display each item having seperate background color.. Like, an item "Green" should be in green background, and "Yellow" in yellow background.

How can I achieve this?


Solution

  • See resolved solution here on ASP.NET Forum