System.Web.UI.WebControls Namespace ListItemCollection Class
Inserts a ListItem that represents the specified string to the collection at the specified index location.
[ VB ]
Overloads Public Sub Insert ( _
ByVal index As Integer, _
ByVal item As String _
)
[ C# ]
public void Insert (
int index,
string item
);
[ C++ ]
public: void Insert (
int index,
String* item
);
[ JScript ]
public function Insert (
index : int,
item : String
);
- index
- The location in the collection to add the ListItem.
- item
- A String that represents the item to add to the collection.
Use the Insert method to add a ListItem to the collection at the index specified by the index parameter. This implementation of the method creates a ListItem to represent the text specified by the item parameter. This ListItem is then inserted in the collection at the specified index.
ListItemCollection Members ListItemCollection.Insert Overload List