Author: FredSaw | Posted on: 4/2/2009 2:27:43 PM | Views : 952

I have a usercontrol which contains a panel control, and within the panel several textboxes for collecting user input, including three date fields.  Each date field  uses an instance of the Ajax Control Toolkit's CalendarExtender, and each CalendarExtender is associated by its "PopupButtonID" property with its own System.Web.UI.WebControls.ImageButton.  Beneath these controls is a "Search" button which is a standard System.Web.UI.WebControls.Button.

In QA testing they found that when a user hits Enter, expecting to start the search, instead the first of the ImageButtons fired and opened the calendar, so a workitem was assigned to me to fix this.  I have used the "DefaultButton" property of the panel to designate btnSearch as the default, and now it fires as desired when the user hits Enter.

The problem is that it fires every time, regardless of which control has focus.  I can tab to an ImageButton and hit ent ...

Go to the complete details ...