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)

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.

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

.NET Framework
Available since 1.1
Return to top
Show: