Redigera

Dela via


ObjectList.SelectedIndex Property

Definition

Returns the index of the selected item. The default value is -1. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 property int SelectedIndex { int get(); void set(int value); };
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public int SelectedIndex { get; set; }
[<System.ComponentModel.Bindable(false)>]
[<System.ComponentModel.Browsable(false)>]
member this.SelectedIndex : int with get, set
Public Property SelectedIndex As Integer

Property Value

The index of the selected item.

Attributes

Exceptions

an attempt to clear this property was made while the ViewMode property was not set to List.

the value is less than zero or larger than or equal to the number of items in the list.

Remarks

Multiple selections are not supported. Set this property to -1 to clear the selection.

Applies to

See also