Clicking On A Form Sets Focus To A Button - ASP.NET 2003

Discussion in 'ASP .Net Web Controls' started by steve@dsainet.com, Feb 24, 2005.

  1. Guest

    I have a aspx form that has focus set to an <asp:button> on the form
    when the user clicks an area within a <form></form>. This causes the
    click event on that control to fire even though the control was not
    clicked. For example, if the button was a "save" button, the form would
    be saved whenever the form was posted back. There is no __EVENTTARGET
    set on the page, nor attributes added... nothing special about the form
    really. Now I know the postback emulates a submit button click, but it
    shouldn't fire the click event of a button on that page should it?

    Naturally I have another form which behaves differently (& correctly
    as I understand things) to further make my hair fall out!

    Any help would be greatly appreciated.

    BTW, lots of code in the form which is why I didn't post it
     
    , Feb 24, 2005
    #1
    1. Advertising

  2. Guest

    BTW... this appears to be the normal behavior.... I should feel really
    stupid, but I don't because it is not consistant. The afore mentioned
    second form that doesn't fire the event has multiple asp:text controls
    on it as well.... ???
     
    , Feb 24, 2005
    #2
    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. Tim Meagher
    Replies:
    4
    Views:
    1,035
    Daniel
    Oct 29, 2004
  2. Nathan Sokalski

    Clicking Refresh Button Resubmits Form

    Nathan Sokalski, Sep 17, 2005, in forum: ASP .Net
    Replies:
    8
    Views:
    6,540
    Deepak Dhawan
    Sep 21, 2005
  3. Replies:
    1
    Views:
    1,752
    Grant Wagner
    Dec 23, 2004
  4. Andy B.
    Replies:
    0
    Views:
    886
    Andy B.
    Nov 25, 2009
  5. Roger
    Replies:
    3
    Views:
    336
Loading...

Share This Page