System.Web.UI.WebControls.ListItemCollection.Remove Method

Removes a System.Web.UI.WebControls.ListItem from the collection that represents the specified string.

Syntax

public void Remove (string item)

Parameters

item
A string that represents the item to remove from the collection.

Remarks

Use the ListItemCollection.Remove(string) method to remove a System.Web.UI.WebControls.ListItem object from the collection. This implementation of the method creates a System.Web.UI.WebControls.ListItem object using the text in the item parameter and then removes this System.Web.UI.WebControls.ListItem from the collection. The specified item parameter must match the ListItem.Value property of an existing System.Web.UI.WebControls.ListItem object, or no item is removed from the collection.

Requirements

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