Sometimes you may want to trigger a button click event when a user pressed the enter key inside of a textbox.  Traditionally this was accomplished by adding some JavaScript to the onclick event. 

At some point ASP.Net added the DefaultNutton property to the asp:Panel and asp:UpdatePanel controls.  All of the sudden the need to add JavaScript was gone and all of us developers thought that we were in the clear.  NOT SO FAST!

Turns out that this feature works great in IE but does NOTHING in FireFox.

The easiest way to get it working is to create a custom LinkButton control[1] with JavaScript[2].  You could put the javascript inside the control but putting it inside a .js file allows for browser caching.

[1] - Class definition
Class

[2] - Javascript
JavaScript

Usage:

NOTE: I hope you have defined the control inside a separate assembly than your Web Application so you will need to <%Register> the control on the page :)

Declare just like a regular LinkButton but use your tag prefix:

<%@ Register Namespace="Your.Namespace.Here" Assembly="Your.Assembly.Name.Here" TagPrefix="my" %>

<asp:Panel DefaultButton="myButton">

<my:LinkButton ID="myButton" />

</asp:Panel>

... enjoy!