The ASP.NET login controls work together to provide a robust complete login solution for your ASP.NET Web applications that requires no programming. By default, login controls integrate with ASP.NET membership to help automate user authentication for your Web site. For information about ASP.NET membership, see Introduction to Membership.
By default, the ASP.NET login controls work in plain text over HTTP. If you are concerned about security, use HTTPS with SSL encryption.
This topic describes each control and provides links to its reference documentation.
The Login Control
The
The Login control has properties for customized display, for customized messages, and for links to other pages where users can change their password or recover a forgotten password. The Login control can be used as a standalone control on a main or home page, or you can use it on a dedicated login page.
If you use the Login control with ASP.NET membership, you do not need to write code to perform authentication. However, if you want to create your own authentication logic, you can handle the Login control's
The LoginView Control
The
The LoginView control also includes events for
The LoginStatus Control
The
You can customize the appearance of the LoginStatus control by setting the
The LoginName Control
The
The PasswordRecovery Control
The
You can configure ASP.NET membership to store passwords using non-reversible encryption. In that case, the PasswordRecovery control generates a new password instead of sending the original password to the user.
You can also configure membership to include a security question that the user must answer to recover a password. If you do, the PasswordRecovery control asks the question and checks the answer before recovering the password.
The PasswordRecovery control requires that your application can forward e-mail message to a Simple Mail Transfer Protocol (SMTP) server. You can customize the text and format of the e-mail message sent to the user by setting the
![]() |
---|
Password information sent in an e-mail message is sent as clear text. |
The following example shows a PasswordRecovery control declared in an ASP.NET page with MailDefinition property settings to customize the e-mail message.
В | ![]() |
---|---|
<asp:PasswordRecovery ID="PasswordRecovery1" Runat="server" SubmitButtonText="Get Password" SubmitButtonType="Link"> <MailDefinition From="administrator@Contoso.com" Subject="Your new password" BodyFileName="PasswordMail.txt" /> </asp:PasswordRecovery> |
The CreateUserWizard Control
The
The CreateUserWizard control gathers the following user information:
-
User name
-
Password
-
Confirmation of password
-
E-mail address
-
Security question
-
Security answer
This information is used to authenticate users and recover user passwords, if necessary.
![]() |
---|
The CreateUserWizard control is inherited from the |
The following example shows a typical ASP.NET declaration for the CreateUserWizard control:
В | ![]() |
---|---|
<asp:CreateUserWizard ID="CreateUserWizard1" Runat="server" ContinueDestinationPageUrl="~/Default.aspx"> <WizardSteps> <asp:CreateUserWizardStep Runat="server" Title="Sign Up for Your New Account"> </asp:CreateUserWizardStep> <asp:CompleteWizardStep Runat="server" Title="Complete"> </asp:CompleteWizardStep> </WizardSteps> </asp:CreateUserWizard> |
The ChangePassword Control
The
The ChangePassword control includes two templated views that are displayed to the user. The first is the
The ChangePassword control works with authenticated and non-authenticated users. If a user has not been authenticated, the control prompts the user for a login name. If the user is authenticated, the control populates the text box with the user's login name.
See Also
