System.Web.UI.WebControls.ListItem.Text Property

Gets or sets the text displayed in a list control for the item represented by the System.Web.UI.WebControls.ListItem.

Syntax

[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.EncodedInnerDefaultProperty)]
[System.ComponentModel.DefaultValue("")]
public string Text { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the ListItem.Text property to specify or determine the text displayed in a list control for the item represented by the System.Web.UI.WebControls.ListItem.

Note:

If the ListItem.Text property contains null, the get accessor returns the value of the ListItem.Value property. If the ListItem.Value property, in turn, contains null, string.Empty is returned.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see System.ComponentModel.LocalizableAttribute and ASP.NET Globalization and Localization.

Requirements

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