@Html.ListBoxFor(x => x.ProductVersions, new SelectList(Model.ProductVersions, "Id", "Title"), new { @class = "dropdown" })

I keep getting the following error:

CS1501: No overload for method 'ListBoxFor' takes 0 arguments

When I do the following it works fine:

@Html.DropDownListFor(x => x.ProductVersions, new SelectList(Model.ProductVersions, "Id", "Title"), "-- Select Version --", new { @class = "form-control", style = "width:300px;" })

I am new to MVC 4 and razor so I am not entirely sure why this isn't working for a listbox but works for a dropdown. I am trying to use Bootstrap Dropdown

Any help would be greatly appreciated.

Related posts

Recent Viewed