---
title: "Label Control in ASP.Net"  
description: "The Label control is used to display text on a page.  aspLabel ID=\"Label1\" runat=\"server\" Text=\"Hello\"The id attribute is used to uniquely identify"  
author: "Pushpendra Singh"  
published: 2010-10-10  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/156/label-control-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Label Control in ASP.Net

The [Label control](https://www.mindstick.com/articles/301/a-label-control-in-vb-dot-net) is used to [display text](https://www.mindstick.com/forum/12715/how-to-display-text-in-an-mvc-view-with-htmlattrbutes) on a page.\

![Label Control in ASP.Net](https://www.mindstick.com/mindstickarticle/549f8aa3-c0b2-4b89-8668-cc5b52e765eb/images/f51100a9-b930-4cdc-b927-dc803f38aa63.png)

```
<asp:Label ID="Label1" runat="server" Text="Hello"></asp:Label>
```

The id attribute is used to uniquely identify the <asp: label> control so you can refer to it in your ASP.NET code. The runat="server" attribute tells the server to process the control and generate HTML code to be sent to the client.

![Label Control in ASP.Net](https://www.mindstick.com/mindstickarticle/549f8aa3-c0b2-4b89-8668-cc5b52e765eb/images/61afdc3b-d0a8-4cfb-af39-22197134d015.png)

[Properties](https://yourviews.mindstick.com/view/81845/now-it-s-possible-to-predict-properties-of-any-molecule)

| [Property](https://www.mindstick.com/articles/198559/an-ownership-of-property-in-hua-hin) | Description |
| --- | --- |
| Text | The text to display in the label |
| [ToolTip](https://www.mindstick.com/articles/1529/simple-tooltip-using-html-css) | The text that appears when the [user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) rests the [mouse](https://yourviews.mindstick.com/story/5122/the-story-behind-lord-ganesha-s-mouse-mushak) [pointer](https://www.mindstick.com/articles/11/pointers) over a control |

![Label Control in ASP.Net](https://www.mindstick.com/mindstickarticle/549f8aa3-c0b2-4b89-8668-cc5b52e765eb/images/184b3ca5-2afa-4ba1-a4f0-f5ff8b749ab6.png)

Here **‘Welcome’** is ToolTip, which user will if mouse pointer is over it. You can set this by using ToolTip property of Label Control.

Likewise we can also set its other properties like fore color, font, width, height etc.

```
<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="Larger" ForeColor="#FF33CC" Text="Label"></asp:Label>
```

![Label Control in ASP.Net](https://www.mindstick.com/mindstickarticle/549f8aa3-c0b2-4b89-8668-cc5b52e765eb/images/7958641a-7190-4ce8-b247-61d02301cd73.png)

---

Original Source: https://www.mindstick.com/articles/156/label-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
