Export (0) Print
Expand All

PasswordRecovery control

The PasswordRecovery control allows user passwords to be retrieved based on the e-mail address that was used when the account was created. The PasswordRecovery control sends an e-mail message containing a password to the user.

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.

Cc295526.alert_note(en-us,Expression.10).gifNote:

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 MailDefinition property.

To add a PasswordRecovery control to a page

  • Drag the PasswordRecovery control from the Toolbox task pane to your page.

The PasswordRecovery control includes three templated views that are displayed to the user. The first is the UserName template, which allows the user to enter a user name. The second template is the Question template, which allows the user to confirm identity by answering a pre-defined question. The Success template defines the user interface that is displayed after a user password has been sent to the user.

To switch between the PasswordRecovery control templates

  1. In Design view, right-click the PasswordRecovery control, and then click Show Common Control Tasks.

    Cc295526.alert_tip(en-us,Expression.10).gifTip:

    You can also click the PasswordRecovery control in Design view, click the arrow Cc295526.fa82fc93-da47-44dc-bf71-77ddd4b69c38(en-us,Expression.10).gif in the upper-right corner to show the Common PasswordRecovery Tasks menu. Click the arrow again to hide the menu.

  2. On the Common PasswordRecovery Tasks menu, choose UserName, Question, or Success in the Views dropdown. The template changes to the view you choose.

To apply basic formatting schemes to the PasswordRecovery control

  1. In Design view, right-click the PasswordRecovery control, and then click Show Common Control Tasks.

  2. On the Common PasswordRecovery Tasks menu, click AutoFormat.

  3. In the AutoFormat dialog box, select one of the schemes in the Select a scheme list. The effect of the scheme on your PasswordRecovery control is displayed in the Preview area.

  4. Click OK to apply the formatting scheme and close the dialog, or Apply to apply the formatting scheme without closing the dialog.

You can also interactively format the PasswordRecovery control, apply styles and change the text.

To interactively design the PasswordRecovery control appearance and text

  1. In Design view, right-click the PasswordRecovery control, and then click Show Common Control Tasks.

  2. On the Common PasswordRecovery Tasks menu, click Convert to Template.

  3. Change the text or appearance of the PasswordRecovery control while it is in template state.

  4. On the Common PasswordRecovery Tasks menu, click Reset to set your changes and exit template state.

  5. To set other properties that determine the appearance and behavior of the PasswordRecovery control, use the Tag Properties task pane.

For a full description of all PasswordRecovery control properties, see PasswordRecovery Members in the MSDN library.

Community Additions

ADD
Show:
© 2014 Microsoft