Skip Navigation LinksASP.Net 2.0 Training : ASP.Net Literal
Banner for ASP.Net 2.0 training classes in Visual Basic 2005 

Skip Navigation Links
ASP.Net 2.0 Training
VS File Management
ASP.Net Image
ASP.Net Checkbox
ASP.Net ImageButton
ASP.Net RadioButton
ASP.Net Literal
ASP.Net Panel
ASP.Net LinkButton
ASP.Net Calendar
ASP.Net BulletedList
ASP.Net FileUpload
ASP.Net User Controls
ASP.Net PlaceHolder
ASP.Net Lists
ASP.Net CheckBoxList
ASP.Net DropDownList
ASP.Net Data Access
ASP.Net DetailsView
ASP.Net FormView
ASP.Net Repeater Control
ASP.Net:Master Pages
Sending EMail
MultiView
Tabbed MultiView
ASP.Net:Wizard Control
Login Controls 1
ASP.Net:Site Navigation
ASP.Net:Classes
ASP.Net:SQLDataSource Control
ASP.Net:Error Handling
ASP.Net:dataTables
ASP.Net:datasets

Visit my other site:

Free Flash 8 tutorials and training

Free Dreamweaver Video Tutorials

Free PHP Training




If you like this site please link to it


Literal Control

  • The Literal control is used to display text on a page. The text is programmable.
  • This control does not let you apply styles to its content!

Property

Description

id

A unique id for the control

runat

Specifies that the control is a server control.  Must be set to "server"

Text

Specifies the text to display

  • Open Visual Studio
  • Add a new webform
  • Name it literal.aspx
  • Click the Add button
  • Select the Design View
  • Add a label control and name it myLabel
  • Add a literal control to the webform and name it myLiteral
  • Erase the text in both controls

  • Double-click the form and add this code:

myLabel.text=”Label Example”

myLiteral.text=”Literal Example”

right click and view in Browser

now right click the browser and view source

Notice the Label is displayed in a <span> tag

But the literal is just displayed

A literal control displays ONLY the value in the text property


      ASP.Net 2.0 tutorials & training