Label Control

You use a Label control to display text. The Label control’s Text property contains the text string to be displayed. Text is the only Label control property that is not inherited from the Control or WebControl classes. The Label control has no events or methods that are not derived from Control or WebControl.

You have seen the Label control used in code examples in previous chapters. You can set the Text and Font properties of the Label control programmatically (as shown in Examples 4-1 and 4-3) or declaratively.

Get Programming ASP.NET, 3rd Edition 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.