<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button1" />
<asp:TextBox ID="TextBox1"
runat="server">
</asp:TextBox><asp:Button ID="Button2" runat="server" Text="Button2" />
</div>
</form>
</body>
how do i make button2 the default action when the Enter key is pressed?
See image:
https://i.stack.imgur.com/3lH97.jpg
The
defaultbuttonproperty can be specified at the Form level in the form tag as well as at panel level in the<asp:panel>definition tag. The form level setting is overridden when specified at the panel level, for those controls that are inside the panel.Source: http://forums.asp.net/t/985791.aspx/1