ListItemCollection::FindByText Method (String^)

 

Searches the collection for a ListItem with a Text property that equals the specified text.

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

public:
ListItem^ FindByText(
	String^ text
)

Parameters

text
Type: System::String^

The text to search for.

Return Value

Type: System.Web.UI.WebControls::ListItem^

A ListItem that contains the text specified by the text parameter.

Use the FindByText method to search the collection for a ListItem with a Text property that equals text specified by the text 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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: