System.Web.UI.WebControls.ListItemCollection.Insert Method

Inserts the specified System.Web.UI.WebControls.ListItem in the collection at the specified index location.

Syntax

public void Insert (int index, ListItem item)

Parameters

index
The location in the collection to insert the System.Web.UI.WebControls.ListItem.
item
The System.Web.UI.WebControls.ListItem to add to the collection.

Remarks

Use the ListItemCollection.Insert(int, string) method to add a System.Web.UI.WebControls.ListItem to the collection at the index specified by the index parameter. This implementation of the method takes the System.Web.UI.WebControls.ListItem specified by the item parameter and inserts it in the collection at the specified index.

Requirements

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