| Yes we can do that below is the javascript code and html code for textbox on to the page.
Add below page in Head element of HTML
< script type = "text/javascript" >
function RestrictSpace()
{
if (event.keyCode == 32)
{
event.returnValue = false;
return false;
}
}
And below is code for textbox html section
< asp:TextBox ID = "txtUsername" onkeypress = "return RestrictSpace();" runat = "server">
| | |