title: Textbox should not to allow spaces in asp.net using javascript
body: <p>Textbox should not allow the spaces in it. I have written a java script which is working..But it failed when space bar is pressed continuously. 
  Please suggest.
  Code i used given below : </p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;
  function splitText() 
  {
  var fullNumber = $get('&lt;%= tbFullNumber.TextBoxClientID %&gt;').value;        
  $get('&lt;%= tbFullNumber.TextBoxClientID %&gt;').value = fullNumber.replace(' ', '');
  fullNumber = $get('&lt;%= tbFullNumber.TextBoxClientID %&gt;').value;
  }
  </code></pre>
  
  <p></p>