ListItem::FromString Method (String^)

 

Creates a ListItem from the specified text.

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

public:
static ListItem^ FromString(
	String^ s
)

Parameters

s
Type: System::String^

The text to display in the list control for the item represented by the ListItem.

Return Value

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

A ListItem that represents the text specified by the s parameter.

Use the FromString static method to create a ListItem from the specified text. This method sets the Text property of the ListItem to the text specified by the s parameter.

.NET Framework
Available since 1.1
Return to top
Show: