title: Don't allow spaces in TextBox asp.net
body: <p>I am trying to avoid spaces in the Textbox and prevent the user to enter any spaces.
  I tried  </p>
  
  <pre><code>&lt;ajaxToolkit:FilteredTextBoxExtender ID="Filteredtextboxextender2" runat="server"
                                  FilterType="Custom" InValidChars=" "
                                  TargetControlID="tx_username"&gt;
                              &lt;/ajaxToolkit:FilteredTextBoxExtender&gt;
  </code></pre>
  
  <p>but it didn't work. Is there any other solutions ?</p>