This documentation is archived and is not being maintained.

ListItem.FromString Method

Creates a ListItem from the specified text.

[Visual Basic]
Public Shared Function FromString( _
   ByVal s As String _
) As ListItem
[C#]
public static ListItem FromString(
 string s
);
[C++]
public: static ListItem* FromString(
 String* s
);
[JScript]
public static function FromString(
   s : String
) : ListItem;

Parameters

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

Return Value

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.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

ListItem Class | ListItem Members | System.Web.UI.WebControls Namespace | Text

Show: