
Originally Posted by
dee-u
Sorry for hijacking this thread but I just need a little more clarification.
For instance I have a Textbox that is used to input a Last Name that goes to a specific field in a table. A user pressed the Space key in the keyboard for that Textbox. If I need to store in a string the value of that textbox then how should I proceed?
In this case it is ok to do:
string s = textBox.Text.Trim();
Code:
if(String.IsNullOrEmpty(s)
{
//use the value
}
since the text box cannot have a null text.