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
 
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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top