System.Web.UI.WebControls.ListItem.FromString Method

Creates a System.Web.UI.WebControls.ListItem from the specified text.

Syntax

public static ListItem FromString (string text)

Parameters

text
a string

Returns

A System.Web.UI.WebControls.ListItem that represents the text specified by the s parameter.

Remarks

Use the ListItem.FromString(string) static method to create a System.Web.UI.WebControls.ListItem from the specified text. This method sets the ListItem.Text property of the System.Web.UI.WebControls.ListItem to the text specified by the s parameter.

Requirements

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