HTML content inside Rad Alert - Code Behind

5 posts, 0 answers
  1. Omer B
    Omer B avatar
    7 posts
    Member since:
    Feb 2014

    Posted 27 Feb 2014 Link to this post

    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#)
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 27 Feb 2014 in reply to Omer B Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Omer B
    Omer B avatar
    7 posts
    Member since:
    Feb 2014

    Posted 27 Feb 2014 in reply to Princy Link to this post

    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 :)
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 27 Feb 2014 Link to this post

    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.
  6. Omer B
    Omer B avatar
    7 posts
    Member since:
    Feb 2014

    Posted 27 Feb 2014 in reply to Marin Bratanov Link to this post

    Hi,
    I just did it an it works great. Thank you all for your help
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017