Author: joerattz | Posted on: 5/20/2009 7:40:30 AM | Views : 274

I am having a problem I never noticed before.  When I specify a default button for a form, the focus functionality doesn't work correctly any more in that if I give focus to a button other than the default button, pressing the enter key causes the default button to be invoked, not the button having focus.
Here is some sample code demonstrating:
1    <%@ Page Language="C#" %>
2    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3   
4    <script runat="server">
5   
6        protected void Page_Load(object sende ...

Go to the complete details ...