W3Schools.com

ASP.NET SelectionMode Property


ListBox Control Reference Complete ListBox Control Reference

Definition and Usage

The SelectionMode property is used to get or set how a user is allowed to select ListBox items.

Syntax

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

Attribute Description
mode Specifies how a users is allowed to select items.

Possible values:

  • Single - Default. Multiple items can not be selected
  • Multiple - Multiple items can be selected


Example

The following example sets the SelectionMode of a ListBox control:

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

Show example »

ListBox Control Reference Complete ListBox Control Reference
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE