Quantcast
Channel: linkLabel usage in C#
Viewing all articles
Browse latest Browse all 5

linkLabel usage in C#

$
0
0
Also, I'm using multiple linkLabels, so I need to specify a specific link for each one how to I do this?
you can specify multiple links in a single link label control; once you set the text property of the control, you can add links pertaining to the text, see the sample given below:
            this.linkLabel1.Text="Microsoft Hotmail";
            this.linkLabel1.Links.Add(0,9,"www.microsoft.com");
            this.linkLabel1.Links.Add(10,7,"www.hotmail.com");

also using the link click method you can navigate to the specified link which the user has clicked.
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start(e.Link.LinkData.ToString());
        }
reference link: http://msdn.microsoft.com/en-us/library/system.windows.forms.linklabel.aspx


Balaji Baskar [Please mark the post as answer if it answers your question]

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>