Edit

Share via


ListItem.FromString(String) Method

Definition

Creates a ListItem from the specified text.

public:
 static System::Web::UI::WebControls::ListItem ^ FromString(System::String ^ s);
public static System.Web.UI.WebControls.ListItem FromString (string s);
static member FromString : string -> System.Web.UI.WebControls.ListItem
Public Shared Function FromString (s As String) As ListItem

Parameters

s
String

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

Returns

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

Remarks

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.

Applies to

See also