Literal control - why?

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

What's the real advantage to using a literal control over a simple label?
What are the pros/cons/typical usages for the literal control?

Thanks.
 
A label renders a <span> tag. It allows you to programmatically change the
display characteristics of some text you want to display. A LiteralControl
renders exactly whatever static HTML you want it to. There is no general
advantage of using one over the other. One may be more useful than another
in certain circumstances. For example, if you want to display static text,
and make no programmatic changes to it, you might want to use a
LiteralControl.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Hi,


Usually I use a Literal to inject Javascript code to the client.

Cheers,
 
Back
Top