Click here to Skip to main content
13,000,469 members (59,753 online)
Rate this:
Please Sign up or sign in to vote.
See more:
function AlertIfCapsLockOn(eventArgs) {
            var keyCode = eventArgs.keyCode ? eventArgs.keyCode : eventArgs.which;
            var shiftKey = eventArgs.shiftKey ? eventArgs.shiftKey : ((keyCode == 16) ? true : false)
            var isEnabled = CapsLockEnabled(keyCode, shiftKey);
            if (isEnabled) {
        function CapsLockEnabled(keyCode, shiftKey) {
            if (((keyCode >= 65 && keyCode <= 90) && !shiftKey) || ((keyCode >= 97 && keyCode <= 122) && shiftKey))
                return true;
                return false;

<asp:TextBox ID="Password" runat="server" TextMode="Password" Width="150px" onclick="return AlertIfCapsLockOn(event);return false;"
                                            <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                                ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="log">*</asp:RequiredFieldValidator>
                                            <telerik:RadToolTip ID="radtooltip" runat="server" Text="Caps Lock is On" ShowEvent="OnFocus"
                                                TargetControlID="Password" Position="BottomCenter" RelativeTo="Element">

Even CapsLock button is off the tooltip is showing on....,
Posted 27-Dec-12 1:03am
Hetal Jariwala 28-Dec-12 1:21am
I wonder if you could do this using javascript???
Hetal Jariwala 28-Dec-12 1:22am
Or you can write script which converts lower case to upper case in textbox...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 28 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100