Enter in textbox causes bad postback

G

Guest

Hello,
I can briefly explain without providing any code, it's a simple NET 1.1 web
project.

I have a web form with a textbox A and button A (in a table row), and
textbox B and button B (in a second table row). The textboxes are of type
asp:Textbox and buttons are asp:Button. Autopostback=false for textboxes.
Click event used for the buttons.

When user types in text in textbox B and hits Enter, the click event for
button A fires!!! Why, what is causing this to happen? I would like some
way to make button B fire instead, so I set the tabindex attributes on each
of the 4 controls above to try and provide that functionality but it didn't
work. the event for button A always fires when I ht enter.

When I added textbox C and button C, etc... the same darn thing!!! How can
I at least turn off this behavior so that when Enter is hit no postback
occurs? I set autopostback to false for the textboxes but this didn't do
anything.

Thanks in advance- Hedge
 

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,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top