RTT Posted March 31, 2005 Posted March 31, 2005 <form id="Form1" method="post" runat="server"> <asp:textbox id="TxtEmail" tabIndex="1" runat="server" Width="272px" ToolTip="Enter your emailaddress for authentication"></asp:textbox> <asp:textbox id="TxtPassword" tabIndex="2" runat="server" Width="272px" ToolTip="Enter your domain password" TextMode="Password"></asp:textbox> <asp:linkbutton id="BtnLogin" tabIndex="3" runat="server">Login</asp:linkbutton> </form> This is the form as i use it for my user to enter thier login information. But now they have to click the link in order to log in. Is it possible to submit the form when 'enter' is pressed (like it's the case with input type="submit" in standard html forms). does anyone know how to do this? Quote
wessamzeidan Posted March 31, 2005 Posted March 31, 2005 put this code in your pageload event handler Page.RegisterHiddenField("__EVENTTARGET", "BtnLogin"); Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
RTT Posted April 1, 2005 Author Posted April 1, 2005 put this code in your pageload event handler Page.RegisterHiddenField("__EVENTTARGET", "BtnLogin"); he creates the hidden field, but it still doesn't work to submit the form when i hit enter while i'm in the passwordfield for example Quote
kahlua001 Posted April 1, 2005 Posted April 1, 2005 Use javascript to capture the enter key and submit the form. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.