Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
PasswordRecovery
Collapse the table of content
Expand the table of content

PasswordRecovery

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.

NoteNote

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 panel to your page.

The PasswordRecovery control includes three template 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.

    tip noteTip

    You can also click the PasswordRecovery control in Design view, click the arrow Cc295526.fa82fc93-da47-44dc-bf71-77ddd4b69c38(en-us,Expression.40).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 discard your changes and exit template state.

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

For a full description of all PasswordRecovery control properties, see PasswordRecovery Members Cc295526.xtlink_newWindow(en-us,Expression.40).png in the MSDN library.

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.

Community Additions

ADD
Show:
© 2015 Microsoft