how to change default ENTER key behaviour on a button/form

F

Flip

On my current form, when I hit the enter key in a texbox, the form appears
to resubmit itself, but it's not actually doing a submit (or so I think?).
I would like to have the enter button fire the logic I have for the button.
In other words, I would like to have a default button for the form, is this
making sense?

I thought I saw on Fritz Onion's MSDN webcasts there is a way to assign a
default button to a form/page, is this in fact possible?

I'm sorry, I'm new to c# (and loving it much more than jsps! :>). Thanks
for any help.
 
J

John M Deal

By default ASP.Net will press the first button in the tab order on the
page. If you want to change that behavior so that you get to pick the
button that is "clicked" when you hit enter then take a look at the
conversation here:

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20944907.html

You should also be able to use that to determine how to modify
clientside behavior as well. Hope that helps.

Have A Better One!

John M Deal, MCP
Necessity Software
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top