---
title: "LinkLabel Control in C#.Net"  
description: "LinkLabel is a class that is derived from label class so it has all the functions of label class. But LinkLabel control works as a hyperlink and its"  
author: "Anonymous User"  
published: 2011-01-24  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/397/linklabel-control-in-c-sharp-dot-net  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# LinkLabel Control in C#.Net

LinkLabel is a class that is derived from label class so it has all the functions of label class. But LinkLabel control works as a hyperlink and its appearance is also a hyperlink.

Drag and drop LinkLabel control from the toolbox on the window Form.

![LinkLabel Control in C#.Net](https://www.mindstick.com/mindstickarticle/a8afe2cc-7bc0-4385-80b0-e7b3d3b181e1/images/0cfbbe6d-eed3-48da-961d-ffeb507f8bfc.png)

##### Code:

Write code on LinkClicked event

![LinkLabel Control in C#.Net](https://www.mindstick.com/mindstickarticle/a8afe2cc-7bc0-4385-80b0-e7b3d3b181e1/images/ce081b39-04e7-4545-928e-90a61ec97596.png)

```
private void linkLabel1_LinkClicked(object sender,  LinkLabelLinkClickedEventArgs e){//after visiting site LinkLabel color changed which will indicate  that you have visited this site        linkLabel1.LinkVisited = true;         System.Diagnostics.Process.Start("www.mindstick.com");         //using the start method of system.diagnostics.process class         //process class gives access to local and remote processes }
```

##### System.Diagnostics.Process.Start

The System. The Diagnostics namespace exposes a Process class that you can use to launch external programs. We can launch a new process with the shared Process. The Start method, passing it either the name of an executable file or a filename with an extension associated with an executable application.

##### Run the project

![LinkLabel Control in C#.Net](https://www.mindstick.com/mindstickarticle/a8afe2cc-7bc0-4385-80b0-e7b3d3b181e1/images/98dead58-a52f-4512-8ade-586402253f23.png)

When you click on the link Go to google then the LinkClicked event will fire and redirected to www.google.com.

![LinkLabel Control in C#.Net](https://www.mindstick.com/mindstickarticle/a8afe2cc-7bc0-4385-80b0-e7b3d3b181e1/images/5e2fe189-fb3d-4a70-babb-7c9d6f7b2806.png)

##### LinkLabel Properties:

**LinkBehaviour:** The behavior of link can be changed through LinkBehaviour properties LinkLabel.

## Example:

```
private void Form9_Load(object sender, EventArgs e){  //disable underline  linkLabel1.LinkBehavior = LinkBehavior.NeverUnderline;}
```

\

![LinkLabel Control in C#.Net](https://www.mindstick.com/mindstickarticle/a8afe2cc-7bc0-4385-80b0-e7b3d3b181e1/images/20860205-08d9-44ed-9cf5-d22bb2633d2e.png)

Now when the application runs then Underline will not show in LinkLabel.

**ForeColor:** set the foreground color of the LinkLabel control.

**BackColor:** set the background color of LinkLabel control.

## \

##### Example:

```
private void Form9_Load(object sender, EventArgs e){         //change BackColor of LinkLabel         linkLabel1.BackColor = Color.CadetBlue;}
```

\

![LinkLabel Control in C#.Net](https://www.mindstick.com/mindstickarticle/a8afe2cc-7bc0-4385-80b0-e7b3d3b181e1/images/c0fdab42-789c-4592-8c5a-0a60f5d836e5.png)

---

Original Source: https://www.mindstick.com/articles/397/linklabel-control-in-c-sharp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
