Reputation: 41
I need help with it and i'm sure its simple but I cant figure it out.
In my rich text box I copy a link in and I dont want it to be a hyperlink.
So how do I remove the hyperlink?
Upvotes: 2
Views: 3690
Reputation: 9653
It seems you're asking about hyperlinks in the RichTextBox in Windows Forms. If so, it's simply a matter of setting the DetectUrls property to false:
richTextBox1.DetectUrls = false;
Upvotes: 10
Reputation: 63865
string BadInput=Textbox.Text....
string GoodInput=BadInput.Replace("<","<").Replace(">",">");
Of course, this is assuming you don't want any HTML to be allowed in the text box.
Upvotes: 2