I want to put a validation that the user always enters a value in the textbox before submiting the form. But the check that I have put allows user to enter white spaces and
in NET4.0 there is a nice function
if(string.IsNullOrWhiteSpace(textBox1.Text)) { //raise your validation exception } else { //go to submit }