5.2 Label Control

A Label control is used to display text. The Label control's Text property contains the text string to be displayed. Note that Text is the only Label control property that is not inherited from the WebControl class. The Label control has no events or methods that are not derived from WebControl.

You have already seen the Label control used in the previous code examples in this chapter. The Text and Font properties of the Label control can be set programmatically (as shown in Example 5-1 and Example 5-2) or declaratively (as demonstrated in Example 5-3 and Example 5-4).



Programming ASP. NET
Programming ASP.NET 3.5
ISBN: 0596529562
EAN: 2147483647
Year: 2003
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net