Question: I want to prevent a user from entering blank spaces into a username textbox.I would be very grateful to the person,if anyone answered

Answer: 
Use Javascript code as below:

```
<input type="text" name="myText" onKeypress="if (event.keyCode == 32) event.returnValue = false;"/>

```

tested in `Internet Explorer`
```
    $('INPUT[type=text]').keypress(function(e) {

                   if (window.event) 
                       keycode = window.event.keyCode;
                   else if (e) 
                       keycode = e.which;
                   else return true;

                   if ((keycode == 32) ) //Space KeyCode
                   {
                       return false;
                   }
                   else {
                       return true;
                   }

               });

```