Wednesday, March 21, 2012

Default Button in master pages - using Ajax

Hi,

My application uses master pages and now recently am using Ajax features. I wanted to handle the enter click in search pages. So i used the defaultbutton property of the page that sets to the control id which we specify when enter is clicked.

But the problem i have is when the focus of the cursor is on another button and i click enter from keyboard it still fires the search event instead of the buttons event.

Can someone explain the behaviour.

Thanks in advance.

Regards,

Rajesh

Setting the default button does just that... sets the default button that gets clicked when the enter key is pressed while on the page. Therefore, no matter what other button has focus on the page, hitting enter fires off the default.

No comments:

Post a Comment