Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > controlling "return key" behavior with multiple "form-elements"

Reply
Thread Tools

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

 
 
Holger (David) Wagner
Guest
Posts: n/a
 
      08-17-2004
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
 
Reply With Quote
 
 
 
 
Karl
Guest
Posts: n/a
 
      08-17-2004
This might be helpful:
http://www.allasp.net/enterkey.aspx

Karl

"Holger (David) Wagner" <(E-Mail Removed)> wrote in message
news:cftiqh$4hr$(E-Mail Removed)-online.net...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling the behavior of document loaded inside Iframe shaj Javascript 1 07-27-2009 09:55 PM
multiple submit buttons -- controlling default button thersitz ASP .Net 0 11-06-2008 08:42 PM
Controlling concurrency to access web pages by multiple users Matt Adamson ASP General 1 10-04-2006 11:12 AM
controlling input behavior of embedded python with PyOS_ReadlineFunctionPointer Gregory Lielens Python 0 05-13-2004 09:09 AM
Controlling behavior of the Enter key in the form. Amir Hardon Javascript 1 02-28-2004 07:16 PM



Advertisments