PureDevelopers
IS-IT--Management
How do I surpress the enter key from submitting an asp:ImageButton?
<asp:ImageButton ID="CatTopNavigationUp" runat="server" CausesValidation="false" OnClick="CatTopNavigationUp_Click" AlternateText="Click here to expand this menu" ImageUrl="Images/CatTopNavigationUp.gif" />
I am using this image to control a collapsable menu in the master page which is used on all pages on my site. I also have a login page which has a submit button. No matter what I do, I can't seem to surpress the enter key from triggering the image button.
I use a default button on the login page, but if I load the page and click on some arbitrary part of the page and then hit enter, the imageButton is getting submitted instead of the form submit button.
<asp:ImageButton ID="CatTopNavigationUp" runat="server" CausesValidation="false" OnClick="CatTopNavigationUp_Click" AlternateText="Click here to expand this menu" ImageUrl="Images/CatTopNavigationUp.gif" />
I am using this image to control a collapsable menu in the master page which is used on all pages on my site. I also have a login page which has a submit button. No matter what I do, I can't seem to surpress the enter key from triggering the image button.
I use a default button on the login page, but if I load the page and click on some arbitrary part of the page and then hit enter, the imageButton is getting submitted instead of the form submit button.