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

HTML content inside Rad Alert - Code Behind

4 Answers 209 Views
Window
This is a migrated thread and some comments may be shown as answers.
Omer B
Top achievements
Rank 1
Omer B asked on 27 Feb 2014, 08:48 AM
Hi all
I need to show a RadAlert with a link (anchor tag) for the user.
When i include the <a tag> the window doesn't popup.

string message = "<A process with this ID already exists <br />, you can find the process <a href='http://mydomain.com'>Here</a>";

(i have reference to the element)
radWindowAlert.radalert(message,330,180,"Process Exists", null);

If i remove the a tag it shows the rest of the text.

(asp.net C#)

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 27 Feb 2014, 09:50 AM
Hi Omer B,

Please try the following C# code snippet which works fine at my end.

C#:
string href = "http://www.google.com";
RadWindowManager1.RadAlert("A process with this ID already exists <br>, You van fnd the process <a href="+href+"> Here </a>", 300, 300, "alert", null);

Thanks,
Princy.
0
Omer B
Top achievements
Rank 1
answered on 27 Feb 2014, 12:46 PM
Hi Princy,
Thank you it works great.

It's weird that i need to omit the (' ') from the href data.
It's not the correct way to write HTML, but if it works than i'm happy :)
0
Marin Bratanov
Telerik team
answered on 27 Feb 2014, 01:42 PM
Hi guys,

You do not need to omit quotes/apostrophes, you only need to escape them: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-dialogs-from-the-server-methods.html.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Omer B
Top achievements
Rank 1
answered on 27 Feb 2014, 01:44 PM
Hi,
I just did it an it works great. Thank you all for your help
Tags
Window
Asked by
Omer B
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Omer B
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or