What is a LiteralControl? I was reading about LiteralContols but I am not sure why they are used.
I used this code to list the controls in a page and -
I have
A lot of programmers who don't understand the value of semantic markup (especially those with primarily a Windows Forms background) will use a Label control or the HTML LABEL tag as a placeholder for programmatically-generated text on a page. The disadvantage to this is that Label has semantic meaning in an HTML document.
Using a literal gives you a control with an ID attribute to hook to, while allowing you to inject semantically correct markup around it.
Additionally, if you end up not pushing any text to a LABEL tag, it will still output the tag in your HTML, like so: , whereas a Literal with no text will output nothing - much cleaner.