How to auto Capital Letter when user key-in value on textbox in VB.net

Last Reply on May 10, 2016 02:25 AM By asrul

Posted on May 09, 2016 07:46 PM

Hi friends,

 

How to make auto Capital Letter when user key-in value on textbox in VB.net?

Posted on May 10, 2016 02:23 AM

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>
Demo