ASP.NET Syntax ASP.NET Syntax for Web Controls
Provides user interface elements that enable a user to recover or reset a lost password and receive it via e-mail.
Declarative Syntax
<asp:PasswordRecovery
AccessKey = "string"
AnswerLabelText = "string"
AnswerRequiredErrorMessage = "string"
BackColor = "color name | #dddddd"
BorderColor = "color name | #dddddd"
BorderPadding = integer
BorderStyle = "NotSet | None | Dotted | Dashed | Solid | Double | Groove |
Ridge | Inset | Outset"
BorderWidth = size
CssClass = "string"
Enabled = "True | False"
EnableTheming = "True | False"
EnableViewState = "True | False"
Font-Bold = "True | False"
Font-Italic = "True | False"
Font-Names = "string"
Font-Overline = "True | False"
Font-Size = "string | Smaller | Larger | XX-Small | X-Small | Small |
Medium | Large | X-Large | XX-Large"
Font-Strikeout = "True | False"
Font-Underline = "True | False"
ForeColor = "color name | #dddddd"
GeneralFailureText = "string"
Height = size
HelpPageIconUrl = "uri"
HelpPageText = "string"
HelpPageUrl = "uri"
ID = "string"
MailDefinition-BodyFileName = "uri"
MailDefinition-CC = "string"
MailDefinition-From = "string"
MailDefinition-IsBodyHtml = "True | False"
MailDefinition-Priority = "Normal | Low | High"
MailDefinition-Subject = "string"
MembershipProvider = "string"
OnAnswerLookupError = "AnswerLookupError event handler"
OnDataBinding = "DataBinding event handler"
OnDisposed = "Disposed event handler"
OnInit = "Init event handler"
OnLoad = "Load event handler"
OnPreRender = "PreRender event handler"
OnSendingMail = "SendingMail event handler"
OnSendMailError = "SendMailError event handler"
OnUnload = "Unload event handler"
OnUserLookupError = "UserLookupError event handler"
OnVerifyingAnswer = "VerifyingAnswer event handler"
OnVerifyingUser = "VerifyingUser event handler"
QuestionFailureText = "string"
QuestionInstructionText = "string"
QuestionLabelText = "string"
QuestionTitleText = "string"
runat = "server"
SkinID = "string"
Style = "string"
SubmitButtonImageUrl = "uri"
SubmitButtonText = "string"
SubmitButtonType = "Button | Image | Link"
SuccessPageUrl = "uri"
SuccessText = "string"
TabIndex = integer
TextLayout = "TextOnLeft | TextOnTop"
ToolTip = "string"
UserName = "string"
UserNameFailureText = "string"
UserNameInstructionText = "string"
UserNameLabelText = "string"
UserNameRequiredErrorMessage = "string"
UserNameTitleText = "string"
Visible = "True | False"
Width = size
>
<FailureTextStyle />
<HyperLinkStyle />
<InstructionTextStyle />
<LabelStyle />
<MailDefinition
BodyFileName = "uri"
CC = "string"
From = "string"
IsBodyHtml = "True | False"
Priority = "Normal | Low | High"
Subject = "string"
>
<EmbeddedObjects>
<asp:EmbeddedMailObject
Name = "string"
Path = "uri"
/>
</EmbeddedObjects>
</MailDefinition>
<QuestionTemplate>
<!-- child controls -->
</QuestionTemplate>
<SubmitButtonStyle />
<SuccessTemplate>
<!-- child controls -->
</SuccessTemplate>
<SuccessTextStyle />
<TextBoxStyle />
<TitleTextStyle />
<UserNameTemplate>
<!-- child controls -->
</UserNameTemplate>
<ValidatorTextStyle />
</asp:PasswordRecovery>
For information on the individual members of this class, see PasswordRecovery in the class library.
The PasswordRecovery control assists users who have forgotten their password. It enables a user to request an e-mail message containing either a new password or the password that is already associated with their user name.
NOTE: The PasswordRecovery control uses Internet e-mail services to send recovered or new passwords to users. There are inherent security risks with sending passwords via e-mail. You should determine whether these security risks are acceptable.
The following example demonstrates how to declaratively set a PasswordRecovery control on a Web form. .
<asp:passwordrecovery id="pw" runat="server"
helppagetext = "Need help?" helppageurl = "passwordhelp.aspx"
onuserlookuperror = "handleLookupError"
onload = "handleLoad">
<titletextstyle font-bold
forecolor = "White" backcolor = "#6B696B" />
<successtemplate>
<table>
<tr>
<td>Your password has been sent to you.</td>
</tr>
</table>
</successtemplate>
</asp:passwordrecovery>
PasswordRecovery Class PasswordRecovery Web Server Control