ASP.NET Literal TextProperty
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), the text is HTML-decoded before it is displayed. However, if this property is set programmatically, or by placing the text between the start and end tags of the control, the text is not HTML-decoded.
Syntax
<asp:HyperLink Text="string" runat="server" />
| Property | Description |
|---|---|
| string | A string value that specifies the text in the Literal control. |
Example
The following example sets the text for the Literal control:
<form runat="server">
<asp:Literal runat="server" Text="EXAMPLE" />
</form>
<asp:Literal runat="server" Text="EXAMPLE" />
</form>
Show example »
Literal Control Other Extensions