I want to add custom class to Asp.net Razor MVC control @Html.DropDownListFor
I have following code
@Html.DropDownListFor(model => model.is_admin, new SelectList(
new List<Object>{
new { value = "true" , text = "Admin" },
new { value = "false" , text = "User" },
},
"value",
"text",
"false" ))
How can this same control be implemented in Asp.net MVC 5
@Html.DropDownListFor(model => model.is_admin, new SelectList(....), new { @class = "yourClassName" ")