For a SharePoint website I was developing user controls that inherit from the ASP.NET 2.0 Membership controls. Submitting the custom login and password recovery controls by clicking the submit button worked as expected. However, submitting the controls by pressing the Enter key on my keyboard resulted in an unexpected "Page not found" error.
The problem was that the default button for the form was not referencing the submit button of the user control. Bind the UniqueID of the submit button to the page form's DefaultButton property. Don't use the ID string directly; use the UniqueID property instead, because ASP.NET automatically created unique ID values.
An example of assigning the DefaultButton property of the page form:
Page.Form.DefaultButton = YourSubmitButton.UniqueID;