Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET Literal Text Property

ASP.NET Literal Text Property


Literal Control Literal control


Definition and Usage

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

If the text is set in ASP.NET code (as shown in the example below), it is 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 A string value that specifies the text in the literal control.

Example

The following example sets the text of a Literal control:

Demo Example »


Literal Control Literal control