This is a migrated thread and some comments may be shown as answers.

label with link in it

6 Answers 189 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Lily
Top achievements
Rank 1
Lily asked on 18 Feb 2011, 10:25 PM
I have RadLabel with the followng code:

lblInfo.Text =

"<html><span><a href=" + url + ">Getting Started Guide</a></span></html>"
I have to problems:
1. The url is pointong to pdf file. If pdf file is not installed it does not give any error, link just does not work without any indication that it attempted to open the file.
2. The of the link is 3 words with spaces. They are shown three separate links. The screenshot is attached.
Thank you
Lily

 

6 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 19 Feb 2011, 08:16 PM
Hello Lily,

You can workaround the links showing as three separate words by including an underscore which won't show when rendered as a link.
For example (Getting_Started_Guide)
this.radLabel1.Text = "<html><span><a href=http://www.telerik.com>Getting_Started_Guide</a></span></html>";

I hope that helps
Richard
0
Lily
Top achievements
Rank 1
answered on 21 Feb 2011, 06:25 PM
Thank you, that helped. But another problem still persists. If I do not have pdf reader installed on my machine, link does not work and no indication of error is given.
0
Richard Slade
Top achievements
Rank 2
answered on 21 Feb 2011, 08:51 PM
Hello Lily,

I have been trying to find a PC in my office that doesn't have or require a PDF reader to try this out, but as yet with no luck. I will look again when I am back in the office for you tomorrow. I have also looked on the Telerik Public Issue Tracking System and there are no issues that list your problem there.
In the meantime, may I ask you to mark the previous reply as answer as it solves your first question and I'll do my best to come back to you regarding this second problem as soon as I can.
Thanks
Richard
0
Lily
Top achievements
Rank 1
answered on 21 Feb 2011, 08:52 PM
Thank you.
0
Richard Slade
Top achievements
Rank 2
answered on 22 Feb 2011, 10:22 AM
Hello Lily,

I can confirm that I can replicate this. It's the same if you give it a filename that doesn't exist. Unfortunatly, I'm unable to offer a workaround. Perhaps this will be picked up for a fix in an upcoming release.

If you need any further information, please let me know.
Regards,
Richard
0
Peter
Telerik team
answered on 23 Feb 2011, 08:20 AM
Hi Lily, 

Thank you for the writing.

This is known behavior of the Html-like feature and you can work around it by following Richard's suggestion.

Do not hesitate to contact us if you have other questions.

Kind regards,
Peter
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Lily
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Lily
Top achievements
Rank 1
Peter
Telerik team
Share this question
or