Link to home
Start Free TrialLog in
Avatar of Lawrence Avery
Lawrence AveryFlag for United States of America

asked on

RichTextBox Control population

How do you place a null  into a RichTextBox control?
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Define what you see as a null. A database null or a code null? A null character or a completely empty RichTextBox? And what language are you using, VB or C#?

If you mean to empty the RTB, then the following should do it:

RichTextBox1.Text = Nothing ' VB
RichTextBox1.Text = null; // C#

But depending on the use, since Text is a string, and since a string can both be empty and have a value of String.Empty, it might not be considered as null, depending on how you use it.

Please, give more information about what you mean by "a  null  into a RichTextBox control", as well as how you intend to use this value, and we should be able to give you a more precise answer.
Avatar of Lawrence Avery

ASKER

I need to put a null value into a column of a sql server database table via the RichTextBox.


Using C#.
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial