ListControl::SelectedItem Property
.NET Framework (current version)
Gets the selected item with the lowest index in the list control.
Assembly: System.Web (in System.Web.dll)
public: [BrowsableAttribute(false)] property ListItem^ SelectedItem { virtual ListItem^ get(); }
Property Value
Type: System.Web.UI.WebControls::ListItem^The lowest indexed item selected from the list control. The default is null.
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.
.NET Framework
Available since 1.1
Available since 1.1
Show: