ASP.NET SelectionModeProperties


ListBox 控件ListBox Control

Definition and Usage

The SelectionMode property is used to get or set the way users select items in a ListBox.

Syntax

<asp:ListBox SelectionMode="mode" runat="server">
Some Content
</asp:ListBox>

Properties Description
mode Specifies how the user selects items in a ListBox.

Possible values:

  • Single - Default. Cannot select multiple items.
  • Multiple - Can select multiple items.


Example

The following example sets the SelectionMode property of the ListBox control:

<form runat="server">
<asp:Calendar id="cal1" runat="server"
SelectionMode="Multiple" />
</form>

Demo Example »

ListBox 控件ListBox Control Other Extensions