System.Web.UI.WebControls.ListBox.GetSelectedIndices Method

Gets the array of index values for currently selected items in the System.Web.UI.WebControls.ListBox control.

Syntax

public virtual int[] GetSelectedIndices ()

Returns

An array of integers, each representing the index of a selected item in the list box.

Remarks

Use the ListBox.GetSelectedIndices method to identify or access the selected items in the System.Web.UI.WebControls.ListBox control. Each element in the returned array represents the index for a selected list item. You can use the index values to access the items in the ListControl.Items collection.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0