I have asp.net page like this: There is a form that contains all, inside it a LoginStatusand some other controls like TextBox and ImageButton.
My problem is that: when we press Enter in the Text box, the LogOut button is pressed, then the user goes out. There is a way to avoid it?
I tried with javascript, but my controls are inside ajax panel and it is very complex, there is a html way?
Regards, Antonino
Wrap the TextBox or the HTML containing the TextBox with something like this:
If you do want something to happen when the enter key is pressed other than the LogOut button you can wrap the content inside a Panel and assign a DefaultButton like this:
Now when the enter key is pressed in either TextBox the Cancel button will fire.