Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple selction in Dropdownlist of asp.net MVC 3

Can we select multiple items from razor dropdownlist control. i.e for

@Html.DropDownListFor(m=>m.Country, CountryList as SelectList,"--Select--")

like image 426
user Avatar asked Aug 08 '12 12:08

user


1 Answers

You can try maybe something like this ...

@Html.ListBoxFor(m=>m.Country, new MultiSelectList(CountryList as SelectList, "CountryID", "Select"))
like image 184
Stonck Avatar answered Sep 19 '22 15:09

Stonck