Looking for a method to replace a string with a hyperlink
- by Richard West
I have a usercontrol in an asp web forms application that I am working on in C#.
I am binding to a repeater and outputting a field of information, named "Text", using the following syntax:
<%# DataBinder.Eval(Container.DataItem, "Text") %>
I am looking for a method that will allow my to search for a keyword within the string that is returned from above, and replace that string with a hyperlink such as
<a href="www.anysite.com/keyword">keyword</a>.
I'm not very familer with user controls and getting data back in this manner so I am looking for advice on how this might be best handled.
Thanks!