Q&A

Q1:Is there any difference in the HTML markup sent to the browser for Literal and Label Web controls?
A1: Recall from our discussions in this hour that when an ASP.NET Web page is executed by the ASP.NET engine, the Web controls are rendered into HTML markup. The precise HTML generated depends upon the Web control's properties.

In this hour we discussed two different Web controls: the Literal Web control and the Label Web control. If you create an ASP.NET Web page with Literal and Label Web controls and set the Text property of both to This is a test , it may appear, when visiting the ASP.NET Web page through a browser, as if both Web controls produce the same HTML output. However, it is important to note that the Label Web control produces ...

Get SAMS Teach Yourself ASP.NET in 24 Hours 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.