Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ListControl.SelectedItem Property

Gets the selected item with the lowest index in the list control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

[<BrowsableAttribute(false)>]
abstract SelectedItem : ListItem with get
[<BrowsableAttribute(false)>]
override SelectedItem : ListItem with get

Property Value

Type: System.Web.UI.WebControls.ListItem
The lowest indexed item selected from the list control. The default is a null reference (Nothing in Visual Basic).

If the list control allows only a single selection, use this property to get the individual properties of the selected item. If the list control allows multiple selections, use this property to get the properties of the lowest indexed item selected from the list control.

The following example demonstrates how to use SelectedItem to get the individual properties of the currently selected item in the RadioButtonList and to display that item and its value.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Show:
© 2015 Microsoft