NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HtmlSelect.SelectedIndex

Gets or sets the ordinal index of the selected option item in an HtmlSelect control. If multiple items are selected, this property holds the index of the first item selected in the list.

[Visual Basic]
Overridable Public Property SelectedIndex As Integer
[C#]
public int SelectedIndex {virtual get; virtual set;}
[C++]
public: __property virtual int get_SelectedIndex();
public: __property virtual void set_SelectedIndex(int);
[JScript]
public function get SelectedIndex() : int;
public function set SelectedIndex(int);

Property Value

The ordinal index of the selected item.

Remarks

For lists with the Multiple property set to true, a value of-1 indicates that no items are selected.

For lists with the Multiple property set to false, an item is always selected.

See Also

HtmlSelect Class | HtmlSelect Members | System.Web.UI.HtmlControls Namespace