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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 28, 2014, 8:51 PM EST
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