Hi
I am very new to asp.net 2.0 as I come from a windows development
background.
I have developed a small user control which has a couple of
textfields. One of the textfield requires that when then return key be
pressed, some validation and database queries are made. For this I
have added the text_changed handler. This works fine. I have also
added a delegate and raised an event when the return key is pressed.
In my webform, I have added the user web control to a panel which also
has some other controls and added the handler to my custom event.
The webform also has a Save button.
The problem I am having is that, when ever I hit the return key in my
user control, the event is raised correctly but then the Save_Click
event is called.
Can I stop this Save_Click event from occuring?
Steve - 22 Aug 2007 13:11 GMT
Look at the HTML for your form, specifically the <form> tag. If you have
a "defaultbutton" attribute set to your save button, this behavior can
happen. If so, just remove the defaultbutton attribute.
Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA
> Hi
>
[quoted text clipped - 17 lines]
>
> Can I stop this Save_Click event from occuring?