Controls You Can Use on Web Forms ASP.NET Standard Controls Label Control
The Label Web server control provides a way to programmatically set text in a Web Forms page.
The Label control is typically used when text in the page needs to change at run time, such as in response to a button click. A Label control is better for simply displaying text than a TextBox control ( or another control ) because the resulting text is static on the page; users cannot edit it.
The Text property of a Label control can be set statically at design time or dynamically at run time. The Text property can also be bound to a data source to display database information on a page.
The Label control is often used in list Web server controls ( Repeater, DataList, and DataGrid controls ) to display read-only information from a database. The usual strategy is to add a Label control to a template for one of these controls. You then bind the Label control to a data source ( generally via the container list control ) . For details about templates, see Web Server Controls Templates.
Adding Label Controls to a Web Forms Page Adding Web Server Controls to a Web Forms Page Web Forms Server Controls and CSS Styles