locked
How to find url from the string and make it as hyperlink in textblock.

    Question

  • Hello,

    How to make url act like a hyperlink in the textblock. Text of the textblock is coming from the webservice.

    I tried following code but it is not working.

    textblock1.Text = Regex.Replace(sometextwithurl,
     @"((http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)",
    "<a target='_blank' href='$1'>$1</a>");



    • Edited by zee_patel Monday, April 21, 2014 11:06 AM
    Monday, April 21, 2014 11:04 AM

Answers

All replies