How can I put a link in a c# textbox? I have tried to put html tags in the box but instead of showing a link it shows the entire html tag. Can this be done with a textbox?
Thanks
How can I put a link in a c# textbox? I have tried to put html tags in the box but instead of showing a link it shows the entire html tag. Can this be done with a textbox?
Thanks
To my knowledge not with the standard textbox. You'd have to create your own. One option it the Telerik controls, they're a little pricey for individual development, but very robust and configurable.
I would try using an editable div and making it look like a text box. This would allow you to get user input and use links.
To make this easier, try JEditable.
Found this project that might do what you want. I haven't needed to show the link rather than the URL before, but this seemed like a possible solution.
I would think about this a little bit. If you allow executable code in an editable control, the user, the user can execute ANY code. This is generally a bad idea.
The behavior of the C# control is intentional to prevent the exact behavior that you are trying to create. A little creativity (such as parsing out links from the text box and creating a list of links next or below the text box) will provide a much safer application.
If that is in windows forms and you really can't use the richtextbox, you can create a control with a linklabel inside of textbox.