Multiple selction in Dropdownlist of asp.net MVC 3
12,080
Solution 1
You can try maybe something like this ...
@Html.ListBoxFor(m=>m.Country, new MultiSelectList(CountryList as SelectList, "CountryID", "Select"))
Solution 2
You just have to add a new { "multiple" = "multiple" }
as last Parameter of the function - this will render a multiselect.
Author by
user
Updated on June 05, 2022Comments
-
user almost 2 years
Can we select multiple items from razor dropdownlist control. i.e for
@Html.DropDownListFor(m=>m.Country, CountryList as SelectList,"--Select--")