I am trying to avoid spaces in the Textbox and prevent the user to enter any spaces. I tried
<ajaxToolkit:FilteredTextBoxExtender ID="Filteredtextboxextender2" runat="server"
FilterType="Custom" InValidChars=" "
TargetControlID="tx_username">
</ajaxToolkit:FilteredTextBoxExtender>
but it didn't work. Is there any other solutions ?