I'm trying to set multiple values in a select list:
SelectList List = new SelectList(MyListItems, "valField", "dataField", <selected values>);
What object/values do I use for to select multiple items?
I'm trying to set multiple values in a select list:
SelectList List = new SelectList(MyListItems, "valField", "dataField", <selected values>);
What object/values do I use for to select multiple items?
Example:
Use the The Harvest Chosen jQuery plugin. See my tutorial Working with the DropDownList Box and jQuery which shows how to do this.
You want to use MultiSelectList instead which has a constructor to meet your needs: