Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Cancel button on [Enter] key press does not fire (http://www.velocityreviews.com/forums/t564112-cancel-button-on-enter-key-press-does-not-fire.html)

gnewsgroup 12-27-2007 03:31 PM

Cancel button on [Enter] key press does not fire
 
A aspx page of mine contains a user control in a Panel control. This
user control has a textbox, a search button and a cancel button like
this:

[ txtSearchBox ] btnSearch btnCancel

When btnSearch is clicked, I show the search result right in the user
control. If btnCancel is clicked, the user control dissappears.

Everything works OK if I simply use mouse-clicks.

I have set the DefaultButton property of the panel to be btnSearch,
and the btnSearch's click event fires when the [Enter] key is pressed.

But, when I tab to btnCancel, and push the [Enter] key, it's still
btnSearch's click event that fires. Note that I can clearly see that
btnCancel is focused.

How can I fix this problem? I am using AJAX, and this Panel is inside
AJAX.






All times are GMT. The time now is 05:58 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.