System.Web.UI.WebControls.ListItemCollection.FindByValue Method

Searches the collection for a System.Web.UI.WebControls.ListItem with a ListItem.Value property that contains the specified value.

Syntax

public ListItem FindByValue (string value)

Parameters

value
The value to search for.

Returns

A System.Web.UI.WebControls.ListItem that contains the value specified by the value parameter.

Remarks

Use the ListItemCollection.FindByValue(string) method to search the collection for a System.Web.UI.WebControls.ListItem with a ListItem.Value property that contains value specified by the value parameter. This method performs a case-sensitive and culture-insensitive comparison. This method does not do partial searches or wildcard searches. If an item is not found in the collection using this criteria, null is returned.

Requirements

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