[2008] LinkButton - Submit on Enter
I would like for my LinkButton to submit my login request upon hitting Enter.
This is my LinkButton(note: resides in a LoginView[Anonymous] template):
Code:
<asp:Panel ID="Panel1" runat="server" DefaultButton="loginButton">
<asp:LinkButton ID="loginButton" CssClass="btnLogin" CommandName="Login"
CausesValidation="true" ValidationGroup="Login1" runat="server" UseSubmitBehavior="false" Text="Sign In" />
</asp:Panel>
IE is ok.
Firefox bad.
I've come across some fixes that seem very convoluted and unnecessary.
Can someone please provide me with an easy fix?
Re: [2008] LinkButton - Submit on Enter
It's the .click, .onclick thing. Because enter is not usual behavior for a link to submit a page, you're in convoluted territory. The reason is that it's ideal to have an imagebutton or button as something that performs a form submission, so you'll need the javascript fixes. For example
http://kpumuk.info/asp-net/using-pan...ol-in-asp-net/