controlling "return key" behavior with multiple "form-elements"

  • Thread starter Holger (David) Wagner
  • Start date
H

Holger (David) Wagner

Hi there,

we have an application which is built with several ASCX controls some of
which contain form elements (e.g. Textboxes, Buttons etc.)

For example: in the top section (one ascx-control), there is a
textbutton in which the user can enter a string to search for. There's
link button right next to that textbutton. Then, in the "content
section" (another ascx-control), there may be a login-dialog which
prompts the user for login-name and password, with another button "Login".

How can we make sure that when the user has entered his login data and
enters "return" (instead of clicking the button), the event handler of
the button is fired instead of firing the event handler of the
search-button? And vice versa: when the user has entered a search string
in the search-textbox and enters "return", how can we make sure this
"search-button" event handler is fired instead of any other "subforms"
event handler.

We cannot have multiple forms as only one form is allowed per ASPX page
(even when distributed among severy ascx-controls).

kind regards,
david
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top