Creating the Equivelant of a Submit Button

C

Coleen

Hi All :)

We would like to create an event that will work like the click of a Submit
button, where when the user hits the Enter key in any control on the web
page, it will act as a Submit button and trigger the event like a Submit
button. Any suggestions?

TIA,

Coleen
 
T

Teemu Keiski

Hi,,

develop the control and put it to output a script such that catch the event,
for example wire an event handler to document's onkeypress or onkeydown
event handlers (with javascript). Then on these event handlers when
event.keyCode is equal to 13, run your control's custom postback
(__dioPostBack) call which you can generate in the control by using
Page.GetPostBackEventReference.

If you want to see a control developed for this exact purpose:
http://www.metabuilders.com/Tools/DefaultButtons.aspx

It is free.
 
C

Coleen

Thanks so much for your help. I will pass this on to my college who does
not have access to these wonderful newsgroups, and asked me to post for him!
Thanks!

Coleen
 

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,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top