I have a form with 2 text boxes and two submit buttons. When I click in textbox1, the focus needs to be set to button1 and with textbox2, the focus needs to be set to button2 as the submit keys. I have been through the forums and they all say that this should work, however its' not working for me. I can't see what I am doing wrong. Please advise. Thanks in advance.
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<aspanel ID="P1" runat="server" DefaultButton="Button1">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click"
TabIndex="1" />
</aspanel>
<aspanel ID="P2" runat="server" DefaultButton= "Button2" >
<asp:TextBox ID="TextBox2" runat="server" TabIndex="2"></asp:TextBox>
<asp:Button ID="Button2" runat="server" Text="Button" onclick="Button2_Click"
TabIndex="3" />
</aspanel>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<aspanel ID="P1" runat="server" DefaultButton="Button1">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click"
TabIndex="1" />
</aspanel>
<aspanel ID="P2" runat="server" DefaultButton= "Button2" >
<asp:TextBox ID="TextBox2" runat="server" TabIndex="2"></asp:TextBox>
<asp:Button ID="Button2" runat="server" Text="Button" onclick="Button2_Click"
TabIndex="3" />
</aspanel>
</asp:Content>