Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hyperlink an Email Address using LinkLabel in C#

I have made an about box that is meant to allow users to click the hyperlink email address which will take them to a Microsoft Outlook to be able to send an email to the email address, but I don't know how to link it to Outlook and allow the user to click the link to do this

like image 776
Chris Bacon Avatar asked Nov 23 '10 21:11

Chris Bacon


People also ask

How do I hyperlink an email address?

On the Insert tab, click Link or Hyperlink. Under Link to, click E-mail Address. Either type the email address that you want in the E-mail address box, or select an email address in the Recently used e-mail addresses list. If you want to change the link text, in the Text to display box, type the text.

What is a LinkLabel in C#?

A LinkLabel control is a label control that can display a hyperlink. A LinkLabel control is inherited from the Label class so it has all the functionality provided by the Windows Forms Label control. LinkLabel control does not participate in user input or capture mouse or keyboard events.

What is the difference between label and link lable in net?

A link label is like a hyperlink that you'd see on a webpage. It's a label thats blue and has an underline and, when clicked, can point to a URL. A label is just a label.


1 Answers

You are not saying whether you are using Win- or WebForms...in WinForms I think you need to create an event-handler for the click event. Inside that you can start the default mail application by typing:

System.Diagnostics.Process.Start("mailto:[email protected]");
like image 122
Ozzy Avatar answered Oct 20 '22 00:10

Ozzy