Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 09-05-2009
Members
 
Join Date: May 2009
Posts: 45
How to insert a hyperlink in Label text

Hi friends,

I want to insert a hype link in one of mine Labeltext.For this i have try to ask my friends for it, but they also don't know how to do it can anyone provide me the code in where i can insert my hyper link in my Labeltext.

Thanks in Advance.
Reply With Quote
  #2  
Old 09-05-2009
Member
 
Join Date: Dec 2008
Posts: 164
Re: How to insert a hyperlink in Label text

First you need to double Linklabel and add the following code

System.Diagnostics.Process.Start("http://Nameofyoursite")

Now you can position the LinkLabel next to your existing label by taking this example

Code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        If RadioButtonList1.SelectedValue = "D" And RadioButtonList2.SelectedValue = "E" Then 
               Label1.Text = "Correct"
               LinkLabel1.Visible = True
        Else 
               Label1.Text = "Incorrect"
               LinkLabel1.Visible = False
        End If
End Sub
Reply With Quote
  #3  
Old 09-05-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
Re: How to insert a hyperlink in Label text

Try to use the following code if you want to insert in Hyperlink in the middle of the control.

Dim MyLabel As New Label
Label1.Text = "This is a <a href='Child1.aspx' Title='This is a tip'>Click me</a> of the link I want."
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to insert a hyperlink in Label text"
Thread Thread Starter Forum Replies Last Post
Converting hyperlink to text in MS Word and MS Excel? Cham-D! Windows Software 7 26-04-2012 05:15 AM
Want hep to modify the data label text box in Excel pie chart Genesee MS Office Support 2 25-02-2012 12:31 PM
Can't assign value to Label.Text in FormView. KAILEY Software Development 5 04-03-2010 07:49 PM
How to Insert a Hyperlink in Entourage Email Matrix316 Windows Software 3 03-10-2009 10:43 AM
How to text wrap with label in winforms G. Kushal Software Development 3 14-07-2009 10:23 AM


All times are GMT +5.5. The time now is 12:44 AM.