title: How to validate textbox only for spaces?
body: <p>I have a tex box in aspx page and i need to validate the text box. How can i do this at server side. </p>
  
  <pre><code>&lt;asp:TextBox ID="TextBox1" runat="server"&gt;&lt;/asp:TextBox&gt;
  
  if(Textbox1.Text=="")
  {
      lblError.Text ="Enter required field":
  }
  </code></pre>
  
  <p>this is working when user leaves the text box blank. But when he enter white spaces the message is not shown. Is there any solution to this?</p>