ASP.NET - SPLessons
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

ASP.NET Label

ASP.NET Label

shape Conceptual figure

Label is also a very important control in ASP.NET. It is widely used in the forms. It is used to display a static text on the page. It has properties like BackgroundColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height, Width etc.

shape Syntax

Find the syntax for the label below. [html] <asp:label id="spLabel"/> [/html]

shape Conceptual figure

Interaction diagram for a label

shape Example

One can add few properties to the label, like below example. [html] <asp:Label id="spLabel" BackColor="Yellow" Text="Welcome to SPLessons" runat="server"/> [/html] In the below form, one can put the title like: Name,Gender, Stream, Technology Known in Labels.