Bug Posts
ASP.NET DefaultButton Property and FireFox
Whilst developing a website at work this week I encountered two issues with the use of default buttons in ASP.NET. Both issues were encountered when using FireFox, but potentially this may apply to all non-IE browsers. Note that this relates to ASP.NET 2.0, so things may be different or even hopefully fixed in later versions of the framework.
Issue 1: Using a LinkButton as the default button of a Panel control does not work in FireFox
The build of the website I have been developing uses styled hyper-links in place of submit buttons, so naturally I implemented these using LinkButton controls allowing for simple postbacks and server-side event handling. Wanting to avoid random submits when a user hits the return key in a form, I wrapped each form in a Panel control and set the DefaultButton properties to the relevant submit LinkButton controls. This works fine when viewing the site in Internet Explorer but does not work in FireFox.
Issue 2: Defining a default button for a Panel control breaks the return key in multi-line TextBox controls in FireFox
Several of the forms on the site require multi-line TextBox controls for such things as description fields. Once again this works fine in Internet Explorer, but has soon as the TextBox is within a Panel with a default button set it breaks in FireFox. Instead of breaking to a new line, the default button is clicked.
Welcome
A vital, animating, or activating factor; stir up; inspire
hunt \hənt\ intransitive verb
To search; seek; look for
Archive
- September 2011 (2)
- June 2010 (1)
- March 2010 (2)
- February 2010 (2)
- January 2010 (1)
- November 2009 (4)
Twitter Updates
Error: Twitter did not respond. Please wait a few minutes and refresh this page.