Is it possible to change link without changing the name?
ex:
linllabeltext.link = "http://mylink.com/";
doesn’t work
and this change the name
linklabeltext.test = "http://mylink.com/"
change the test
I have added this function at click
Process.Start(linklabetext.text);
how?
full code:
private void (......)
{
.....
var name = result.name;
.......
labelLink1.text = name;
}
private void labelLink1_click....
{
Process.Start(labelLink1.text);
}
but this code change the name of labelLink1 in a link es: http://mysate.com but the name of labelLink is Visit a Web Site
Take a look at the examples on MSDN. Specifically where they create the
LinkLabeland set it’s link(s) and text:I’ve never actually used this control before, but it appears that you set the
.Textto any string and then set the “links” to correspond to substrings within the.Textproperty.Edit: I just noticed that you’re also using the wrong event for clicking on the link. You don’t want to bind to the
LinkLabelcontrol’sClickevent. It has aLinkClickedevent which puts more information in the event about the link being clicked. Take a look at, of course, the MSDN examples: