Enter event

C

Cherry

I have a web form with a textbox and a button. What I want to happen is whenever enter key was pressed, the script behind button_click will be triggered. I have already searched problem same as mine but I was not able to resolve it since they make use of c#. How can I do this using VB.net?
 
A

Alessandro Zifiglio

hi Cherry, if that button is the only button on your form then it will be
the default button that will postback when you hit enter, however if you
have more than one button then you will have to resort some javascript to
perform this.

Andy smith has a free control, the "default button" which makes this very
simple and does exactly this, in that you can designate a default button and
control this from code.

for more check out his free control.
http://www.metabuilders.com/

hmm the site appears to be down. However should be back online soon. Look
for the default button control from the list of controls on his site.
Cherry said:
I have a web form with a textbox and a button. What I want to happen is
whenever enter key was pressed, the script behind button_click will be
triggered. I have already searched problem same as mine but I was not able
to resolve it since they make use of c#. How can I do this using VB.net?
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top