Standards, BEST PRACTICE, accessibility, usability, XML
The event driven programming model in ASP.NET made possible by HTML and WEB controls "runat server" is a great idea but not without problems. It is a usability disaster that the use of ENTER in forms no longer works as expected.
In HTML and in dialog boxes in Windows you often execute an input element in a form by ENTER. You don't have to click the "Go"-button directly. This works well in a search field and when the user needs to login using a password. This is probably the preferred way of handling these form elements by power users.
The use of ENTER often misfires in longer forms. Some users think that ENTER brings them "one down" to the next form element. Instead the form is executed. In most cases some sort of validation rescues the unlucky user and brings back the form in order for the missing fields to be filled in.
In ASP.NET using HTML and WEB Controls the behavior of the form elements are very different. The whole idea is that you have to click the "Go"-button activating the "click" or "onserverclik" events. Nothing happens pressing ENTER when you are still in the input field.
This is nice in longer form, where the mentioned misbehavior of ordinary HTML no longer takes place. But it is a problem in search fields or when you try to login. Nothing happens when pressing ENTER if you are still in the input field! In a search field the user finds nothing, and many users trying to login think they have forgotten their password.
This is close to being a usability disaster. In most cases HTML and WEB controls work fine if you have a lot of form elements to deal with. But if you only have a single input field together with a "GO"-button, HTML and WEB controls runat server simply don't work as expected and should be avoided.
Copyright © Jesper Tverskov, 2002
Last updated 2006-07-13
[+] Appendix
Article: ENTER and event driven programming
Author: Jesper Tverskov
Published: 2002-04-27
I was very proud when writing the article, that I had discovered a major problem in Microsoft's new ASP.NET. I soon learned that many others had discovered the ENTER problem, and that it was all over the web.
It could be interesting to know what happened in ASP.NET 2.0. Did Microsoft change this ENTER usability disaster or not? Mail me if you know the story. I will test it one day.
A sub heading, "ENTER in ASP.NET", added for better readability. I have disabled the debate with two entries for the time being. At the moment I prefer that people mail me directly.