Enter in textbox causes bad postback

Discussion in 'ASP .Net' started by =?Utf-8?B?VG9ueSBIZWRnZQ==?=, Sep 22, 2004.

  1. 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
     
    =?Utf-8?B?VG9ueSBIZWRnZQ==?=, Sep 22, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xavier Osa
    Replies:
    0
    Views:
    663
    Xavier Osa
    Jan 9, 2004
  2. =?Utf-8?B?RGVtZXRyaQ==?=

    RE: Enter in textbox causes bad postback

    =?Utf-8?B?RGVtZXRyaQ==?=, Sep 22, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    636
    =?Utf-8?B?VG9ueSBIZWRnZQ==?=
    Sep 22, 2004
  3. vMike
    Replies:
    1
    Views:
    573
    =?Utf-8?B?VG9ueSBIZWRnZQ==?=
    Sep 22, 2004
  4. rantingrick
    Replies:
    44
    Views:
    1,297
    Peter Pearson
    Jul 13, 2010
  5. HopfZ
    Replies:
    0
    Views:
    624
    HopfZ
    Aug 28, 2006
Loading...

Share This Page