Name

Literal

Synopsis

You can use a Literal control to put plain text on a page (optionally, with embedded HTML markup tags). In this respect, the Literal control is somewhat like the Label control, except it cannot use any special formatting, styles, or fonts.

Do not confuse the Literal control with the System.Web.UI.LiteralControl class. The latter is used by ASP.NET to represent static HTML content found on a web page that will not be made available to your code as a server-side control.

Public Class Literal : Inherits System.Web.UI.Control
' Public Constructors
   Public Sub New() 
' Public Instance Properties
   Public Property Text As String  
' Protected Instance Methods
   Overrides Protected Sub AddParsedSubObject(
        ByVal obj As Object) 
   Overrides Protected Function CreateControlCollection(
        ) As ControlCollection  
   Overrides Protected Sub Render(
        ByVal output As System.Web.UI.HtmlTextWriter) 
End Class

Hierarchy

System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor) Literal

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.