Label Server Control

Label Server Control

The Label server control is used to display text in the browser. As it is a server control, you can automatically change the text from your server-side code.

<asp:Label> control, this control uses the Text attribute to assign the content of the control.

Code for the Label Server Control:
<asp:Label ID=”Label1″ runat=”server” Text=”Hello World” />

The Label Server Control simply shows you the Text.

In the given example, we have used two label server control named as “Username” and “Password” and two textboxes in respect to provide input by a user.

Scroll to Top