EmailTextBox.Attributes.Add(“onKeyPress”, “javascript:if (event.keyCode == 13) __doPostBack(‘” + LoginButton.UniqueID + “‘,”)”);
Another one Simple Method is use the Panel inside it put the Default Button Focus To It
<asp:Panel ID=”Hi” runat=”server” DefaultButton=”Button1″>
You can also kept the focus coding at the Form tag itself
<form id=”form1″ runat=”server” defaultbutton=”Button3″ >