How to: Add and Configure a Label Control
Use the Label control to display short, output-only text strings.
To add a Label control to an ASP.NET mobile Web Forms page
-
Drag a Label control from the Mobile Web Forms tab of the Toolbox onto a Form or Panel control, or inside a control's template on a mobile Web Forms page. You can also drag it onto a mobile user control page. You can also drag it onto a mobile user control page.
-
In the Properties window, type the text that you want for the label in the Text property.
-
Optionally format the appearance of the label by using the Properties window:
-
Set the text color with the ForeColor property.
-
Define the text alignment by setting the Alignment property to Left, Center, or Right.
-
Specify the font by using the Font property.
-
Set the text's style with the StyleReference property.
-
Enable or disable text wrapping by using the Wrapping property.
-
Prevent a line feed after the Label control by setting the BreakAfter property to false.
-
Apply device filters with the AppliedDeviceFilters collection. You can also override properties for the Label control.
-
Concepts
Introduction to the Label ControlOverriding Properties
Other Resources
Label ControlUsing Device Filters