Hi,
In the masterpage,
LoginButton2 looks good at first, but if you search for it in the code, you won't find a control with an Id of LoginButton2. You do, however, find this:
<input type="submit" name="Login1$LoginButton2" value="Log In" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("Login1$LoginButton", "", true, "Login1", "", false, false))" id="Login1_LoginButton2" />
Because the page is based on a Master Page, the HTML name and id attributes have been prefixed with the names of their naming container, the ContentPlaceHolder1 in this case.
you also could write in the code behind: this.Panel1.DefaultButton = this.Login1.FindControl("LoginButton").UniqueID;
The more information please click following link: http://www.spaanjaars.com/QuickDocId.aspx?QUICKDOC=374
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Yours sincerely,
Amanda Wang
Microsoft Online Community Support