ObjectList.SelectedIndex 屬性

定義

傳回選取項目的索引。 預設值是 -1。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 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

屬性值

選取之項目的索引。

屬性

例外狀況

嘗試清除這個屬性,但是 ViewMode 屬性並未設定為 List

值小於零,或是大於或等於清單中的項目數。

備註

不支援多個選取專案。 將此屬性設定為 -1 以清除選取範圍。

適用於

另請參閱