Type: Integer
Availability: Read or write at any time
The multiSelect property determines whether a user can make multiple selections in a ListBox control and the way in which multiple selections can be made.
The settings of the multiSelect property are listed in the following table.
ListBox Class Constant | Value | Description |
---|---|---|
MultiSelect_None | 0 | Multiple selection is not allowed (the default). |
MultiSelect_Simple | 1 | Simple multiple selection. A click or the space bar selects or deselects an item in the list. (Arrow keys move the preselect focus.) |
MultiSelect_Extended | 2 | Extended multiple selection. Shift+click or Shift+arrow key extends the selection from the previously selected item to the current item. |
Ctrl+click selects or deselects an item in the list. Ctrl+up arrow, down arrow, Home, End, Page Up, or Page Down key changes the current list entry but does not alter the selected status of any entry. Ctrl+space bar selects or deselects an item in the list. |
When multiple items are currently selected, the value of the listIndex property is the last of the items selected. One or more items can be selected, with the value of the listIndex property being none of those items (for example, when you select an item, press the Shift key and select another item, then press the Ctrl key and remove the selection of one of the previously selected items).
You must use the Ctrl key or Shift key to select multiple items in a list box on a Web form, as HTML does not support the MultiSelect_Simple functionality. Multiple selections are therefore regarded as extended multiple selections (that is, MultiSelect_Extended).