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

S

steve

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
 
S

steve

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.... ???
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top