I am trying to apply styling to the following line
@Html.DropDownList("productOptions", "Products")
I rewrote to the following
@Html.DropDownList("productOptions", "Products", new { @class = "form-control" })
In my controller I added productOptions
to ViewData["productOptions"]
and Products is an optional string for default text
but I keep getting the following error message about the syntax
Argument 3: cannot convert from 'string' to 'System.Collections.Generic.IEnumerable<System.Web.Mvc.SelectListItem>'
Cannot resolve method 'Dropdownlist(string, string, { class:string}' candidates are:
Anyhelp is greatly appreciated.