Share via


SELECTEDINDEX Attribute | SelectedIndex Property

Sets or retrieves a value that indicates the index of the selected object.

Syntax

ASP <tagPrefix:ELEMENT SELECTEDINDEX = iIndex ... >
Script [ iIndex = ] object.SelectedIndex

Possible Values

tagPrefix Required. The element prefix associated with the WebControls namespace (Microsoft.Web.UI.WebControls). A TagPrefix is defined using the directive.
iIndex System.Int32 that specifies or receives the index of the selected object.
-1Default. No Tab is selected on the TabStrip control or the MultiPage control does not have a PageView.

The property is read/write. The property has a default value of -1.

Remarks

If the MultiPage contains a PageView, the default value of the SelectedIndex property is 0, unless otherwise specified by the user.

This property throws an exception if the value that is set is invalid.

Applies To

MULTIPAGE, TABSTRIP

See Also

Internet Explorer WebControls, About the MultiPage WebControl, About the TabStrip WebControl