If your login control is defined like this:
asp:Login ID="LoginCtrl" runat="server" />
add this code to Page_Load handler
protected void Page_Load(object sender, EventArgs e)
{
Button btn = (Button)LoginCtrl.FindControl("LoginButton");
if (btn != null)
Page.Form.DefaultButton = btn.UniqueID;
}
Note: This works only if LoginButtonType is Button, if not this does not work
No comments:
Post a Comment