Additionally, in VS 2010, there is a new string function String.IsNullOrWhiteSpace(txtA.text) which checks if the textbox is empty, equals Nothing (which in the case of the textbox is never the case), or is just filled with white space.