Easy Tutorial
❮ Aspnet Button Prop Webcontrol Hyperlink Text ❯

ASP.NET Literal Text Property



Definition and Usage

The Text property is used to set or return the text of the Literal control.

If the text is set in the ASP.NET code (as shown in the example below), it will be HTML decoded before being displayed. However, if this property is set programmatically, or by placing the text between the control's start and end tags, the text is not HTML decoded.

Syntax

Property Description
string String value, specifies the text within the literal control.

Example

The following example sets the text for the Literal control:


❮ Aspnet Button Prop Webcontrol Hyperlink Text ❯