I want to know how to avoid space and enter key equal to a mouse left button down for purposes of raising a click event.
I
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manish Kumar ChoudharyPosted Nov 29, 2014, 1:51 AM
hi Narasingh Rao,
Use following function inside textbox. It will remove space from text-box when focus goes out from text-box.
<script type="text/javascript">
function RemoveSpaces(string) {
return string.split(' ').join('');
}
script>
Example
<asp:TextBox ID="TextBox1" runat="server" onblur="this.value=RemoveSpaces(this.value);">asp:TextBox>
same way for enter key also