Hi friends,
How to make auto Capital Letter when user key-in value on textbox in VB.net?
Dear Andrea,
I'm not looking for first letter, but i want all value in Capital Letter. Thanks
try this. $("#txtbox").bind('keyup', function (e) { if (e.which >= 97 && e.which <= 122) { var newKey = e.which - 32; e.keyCode = newKey; e.charCode = newKey; } $("#txtbox").val(($("#txtbox").val()).toUpperCase()); });
Hi KuldeepDev
need to add on source code? which area?
Hi,
Please refer below code.
HTML
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript"> function Capital(txt) { txt.value = txt.value.replace(/^\s+/, '').toUpperCase(); } </script> </head> <body> Enter Name: <input type="text" value=" " onkeyup="Capital(this)" /> </body> </html>
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.