views:

11

answers:

1

How would i prevent text from being automatically formatted when added to a RichTextBox, or better yet, override the formatting that does occur?

For instance, the following code sets the text, but then creates a formatted link to a server.

rtbSomeField.Text = "\\\\just some text";

Results in

alt text

I understand why it's doing this, but is there a way to disable or override that particular feature?

+1  A: 

Set DetectUrls to false for the RichTextBox

Good luck!

Homam
Oh wow. +1 and accept. I scrolled through Intellisense for the control and completely missed that. Thanks.
bill weaver