GeekArticles
Database
SQL ServerWarning the User when Caps Lock is On
Author: aspnet.4guysfromrolla.com |
Published: 14th May 2008 |
Visited: 478 times |
Add CommentFiled in: SQL Server
Most security systems' passwords are case-sensitive. Case sensitivity nearly doubles the number of possible characters that can appear in the password, which
makes it harder for nefarious users trying to break into the system. As a result, if a user logging into the system has Caps Lock turned on, they'll
enter letters in the opposite case and not be able to login. Because the textboxes that collect user input typically are masked to prevent an
onlooker from seeing a user's password, the user typing in her password may not realize that Caps Lock is on. To help prevent this type of user error,
many login screens for desktop-based applications display some sort of warning if the user's Caps Lock is on when they start typing in their password.
Unfortunately, such functionality is rarely seen in web applications. A 4Guys reader recently asked me if there was a way to provide such feedback to a
user logging into an ASP.NET website. The short answer is, Yes. It is possible to detect whether a user has Caps Lock enabled through JavaScript.
Likewise, it's possible to have this client-side logic execute whenever a user starts typing in a particular textbox. With a little bit of scripting,
such an interface could be devised.
After thinking about the implementation a bit, I decided to create a compiled server-side control that would emit the necessary JavaScript. This article
introduces this control, WarnWhenCapsLockIsOn, and shows how it works and how to use it in an ASP.NET web page. Read on to learn more!
Read More >
Read Article Sponsored Links
Related Articles
• User Experience and Design Join Sun software lead user experience designer Jeff Hoffman at his JavaOne session, Designing GUIs 101 (4968), so you can sling the slang around user-centered design with author ...
• WinForms lock detector Nice and pretty simple C# class to detect that a GUI thread can not process window messages (and user actio ...
• Creating an Online Boggle Solver :: Building the User Interface
I spend most of my day writing about ASP.NET or building ASP.NET applications for clients. As every ASP.NET developer knows, the bulk of ASP.NET development
centers around data access - building pages to collect user input and crafting reports to summarize that information. To help break this monot ...