Fire correct submit button when enter key is pressed in UserControl


F

Frank

Hi!

I have a really 'simple' problem. I have an .aspx page with 2
textboxes (login & password) and a Submit button. This works very
well, i fill in my login and password and simply press the enter key
and the form submits and the Button_Click event on the .aspx page is
triggered.

Now i also have a usercontrol (.ascx) wich include 1 texbox and also
an submit button. Now comes the problem. The page displays correct,
BUT when i fill in my email in the UserControl and press the enter key
the page submits but the Button_Click on the .aspx page is triggered
instead off the Button_Click in the usercontrol !! *aaargh*.

Is there a nice sollution that works with almost every browser (also
some older flavors), if there is a nice sollution anyways...

Hope you can help me out,
Frank
 
Ad

Advertisements

Ad

Advertisements

F

Frank Dux

Hi Eliyahu,

Thanks for the quick reply. I looked at the given url but, like already
stated in the article, it is rather un-elegant. Isn't there any other
cleaner way ?
 

Top