Easy Tutorial
❮ Prop Webcontrol Listcontrol Datavaluefield Control Style ❯

ASP.NET ListItem Selected Property



Definition and Usage

The Selected property is used to set or return whether the ListItem is selected by default.

If this property is set to TRUE, the ListItem is selected by default; otherwise, it is FALSE. The default is FALSE.

Syntax


Example

The following example sets the selected ListItem in a ListBox control:


❮ Prop Webcontrol Listcontrol Datavaluefield Control Style ❯