ListControl.SelectedItem Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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 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: