System.Web 2.0.0.0 System.Web.UI.WebControls.CompositeControl System.ComponentModel.Bindable(false) In this topic: Introduction Views Styles and Templates Validation Groupings Applying CSS Styles Accessibility Declarative Syntax

Introduction

The control assists users who have forgotten their passwords. It enables a user to request an e-mail message containing either a new password or the password already associated with his or her user name. The Web control uses Internet e-mail services to send recovered or new passwords to users. There are inherent security risks with sending passwords in e-mail. You should determine whether these security risks are acceptable to your site. If you are not familiar with the set of login controls available in ASP.NET, see
ASP.NET Login Controls Overview before continuing. For a list of other topics related to login controls and membership, see Managing Users By Using Membership. Users can recover passwords only when the membership provider defined in the property supports clear text or encrypted passwords. Because hashed passwords cannot be recovered, users at sites that use hashed passwords can only reset their passwords. Accepting user input is a potential security threat. Malicious users can send data that is intended to expose vulnerabilities or run programs that try generated passwords. To improve security when working with user input, you should use the validation features of your control and secure any data providers that are configured for your control. For more information, see Securing Login Controls, Basic Security Practices for Web Applications, and Securing Membership. The control can be used when a membership user has not been approved ( is set to false), but it cannot be used when a membership user has been locked out ( is set to true). The e-mail message is sent using the class. To be able to send e-mail to users, you must configure a mail server in your application's Web.config file. You can change the content of the e-mail sent to users by setting a custom message in the property. It is not possible to guarantee that a user will receive or view an e-mail message. To verify that a user has received a notification by e-mail, consider providing a confirmation link in the message, allowing the user to confirm that the notification was received.

Views

The control has three states, or views: UserName view -- Asks the user for his or her registered user name. Question view -- Requires the user to provide the answer to a stored question to reset the password. Success view -- Tells the user whether the password recovery or reset was successful. The control displays the Question view only when the membership provider defined in the property supports password question and answer. The following table lists each style property of the control and indicates which view it affects. Property UserName view Question view Success view Yes Yes Yes Yes Yes No Yes Yes No Yes Yes No Yes Yes No No No Yes Yes Yes No Yes Yes Yes

Styles and Templates

You can use an extensive set of style properties to customize the appearance of the control. Alternatively, you can apply custom templates to the three views if you need complete control over the appearance of the control. You can use the , and properties to create templates for these views. If you define a template for a view, the style properties of have no effect. The following table lists the control style properties and explains which UI element each style property affects. For a list of which properties each style applies to, see the documentation for the individual style properties. Style property UI element affected Submit buttons on all views. Error text displayed to the user. Links to other pages. Instructional text on the page that tells users how to use the control. Labels for all input fields, such as text boxes. Text entry input fields. Title text for each view. Text displayed to the user when the password recovery or reset attempt is successful. The following table lists which template properties apply to each view in the control. For a list of the controls that you must set in each template, see the documentation for the individual template properties. View Template property UserName Question Success When the control is not customized with templates, the property of the control applies to the first text box in the control and the property, which is applied to all text boxes of the control. If the control is customized with templates, then the property and the property are ignored. In this case, set the property and the property of each template child control directly. control properties represented by text boxes, such as and , are accessible during all phases of the page life cycle. The control will pick up any changes made by the end user by means of the event triggered by the textboxes.

Validation Groupings

The control creates a validation group for all required field validators in the control so that other input controls on the page are not affected by validating the control. By default, the property of the control is used as the name of the validation group. For example, a control with the ID "PasswordRecovery1" will use a validation group name of "PasswordRecovery1". If you want the control to participate in another validation group, you must template the control.

Applying CSS Styles

The control lets you specify CSS style rules in markup. If you use templates to customize the appearance of the control, you can specify CSS styles in the markup in the templates. In that case, no extra outer table is required. You can prevent the table from being rendered by setting the property to false.

Accessibility

For information about how to configure this control so that it generates markup that conforms to accessibility standards, see
Accessibility in Visual Studio 2010 and ASP.NET 4 and ASP.NET Controls and Accessibility.

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>
Provides user interface (UI) elements that enable a user to recover or reset a lost password and receive it in e-mail.
Constructor Use this constructor to create and initialize a new instance of the class. Initializes a new instance of the class. 2.0.0.0 Property System.Web.UI.Themeable(false) System.String To be added. The property contains the answer to the confirmation question entered by the user. The property is valid only after the page has been posted back to the server. This property cannot be set by themes or style sheet themes. For more information, see and ASP.NET Themes Overview. Gets the answer to the password recovery confirmation question entered by the user. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the label text for the password recovery confirmation answer text box. The style settings in the property define the appearance of the text specified in the property. If you assign a template in the property, the property has no effect. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the label text for the password confirmation answer text box. 2.0.0.0 Event System.EventHandler The event is raised when the answer to the password recovery question is not validated by the membership provider defined in the property. If the membership provider does not support password recovery question and answer, the event is never raised. For more information about handling events, see Consuming Events. Occurs when the user enters an incorrect answer to the password recovery confirmation question. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The contains the error message to display in any control on the same page as the control. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the error message displayed to the user when the Answer text box is blank. 2.0.0.0 Property System.Int32 To be added. The value of the property is stored in view state. Gets or sets the amount of padding inside the borders of the control. 2.0.0.0 Method 2.0.0.0 System.Void The method creates instances of the controls that make up the control and creates default event handlers for their events. Creates the individual controls that make up the control. Property System.Web.UI.WebControls.TableItemStyle To be added. The property defines the appearance of error messages in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form , where represents a property of the class (for example, FailureTextStyle-ForeColor). You can set the property programmatically in the form (for example, FailureTextStyle.ForeColor). Common settings include custom background color, text color, and font properties. The property defines the appearance of the following properties: The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control. The following style properties are overridden by settings: When you use templates to define the appearance of the control, the property has no effect. Gets a reference to a collection of properties that define the appearance of error text in the control. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property is displayed to the user when there is a problem with the membership provider that manages user information for the control. Typically, the property is displayed when the membership provider cannot connect to the data store containing user information. The text specified in the property is displayed in the UserName view when the provider cannot find the specified user name in the database. The property is displayed in the Question view when the answer entered by the user does not match the stored answer. The property is displayed for all other errors. The appearance of the property is defined by the style settings in the property. When you set templates to define the appearance of the control, the property is displayed in an optional control with the control ID set to "FailureText". The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the error message to display when there is a problem with the membership provider for the control. 2.0.0.0 Property System.String To be added. To be added. Gets or sets the URL of an image to display next to the link to the Help page. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the link text for the password recovery Help page. If a URL is specified in the property, the control displays a link to information about password recovery in the UserName view and the Question view, but not in the Success view. If the property is set to , no link is displayed. The appearance of the Help page link is defined by the property. When you use templates to define the appearance of the control, the and properties have no effect. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the text of the link to the password recovery Help page. 2.0.0.0 Property System.String To be added. The property contains the URL of the password recovery Help page. The control displays a link to the password recovery Help page in the UserName view and the Question view but not in the Success view. If the property is set to , no link is displayed. The appearance of the Help page link is defined by the property. When you use templates to define the appearance of the control, the and properties have no effect. Gets or sets the URL of the password recovery Help page. 2.0.0.0 Property System.Web.UI.WebControls.TableItemStyle To be added. The property defines the appearance of the property. This property is read-only; however, you can set the properties of the object it returns. The properties can be set declaratively in the form , where represents a property of the class (for example, HyperLinkStyle-ForeColor). You can also set the properties programmatically in the form (for example, HyperLinkStyle.ForeColor). Common settings include custom background color, text color, and font properties. The style settings for the property are merged with control style settings. Any settings made in the property override the corresponding settings in properties of the control. The following properties are overridden by settings: When you use templates to define the appearance of the control's UserName view or Question view, the property has no effect. Gets a reference to a collection of properties that define the appearance of hyperlinks on the control. 2.0.0.0 Property System.Web.UI.WebControls.TableItemStyle To be added. The property defines the appearance of explanatory text in the control. This property is read-only; however, you can set the properties of the object it returns. You can set the properties declaratively in the form , where represents a property of the class (for example, InstructionTextStyle-ForeColor). You can also set the properties programmatically in the form (for example, InstructionTextStyle.ForeColor). Common settings include custom background color, text color, and font properties. The property defines the appearance of the following properties: Style settings made to the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control. The following control properties are overridden by properties: When you use templates to define the appearance of the control's UserName view or Question view, the property has no effect. Gets a reference to a collection of style properties that define the appearance of explanatory text in the control. 2.0.0.0 Property System.Web.UI.WebControls.TableItemStyle To be added. The property defines the appearance of text box labels in the control. This property is read-only; however, you can set the properties of the object it returns. You cans set these properties declaratively in the form , where represents a property of the class (for example, LabelStyle-ForeColor). You can also set the properties programmatically in the form (for example, LabelStyle.ForeColor). Common settings include custom background color, text color, and font properties. The property defines the appearance of the following properties: Style settings made to the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control. The following properties are overridden by settings: When you use templates to define the appearance of the control's UserName view and Question view, the property has no effect. Gets a reference to a collection of style properties that define the appearance of text box labels in the control. 2.0.0.0 Method 2.0.0.0 System.Void To be added. Implements the base method. An object that represents the control state to be restored. Method System.Void To be added. Implements the base method. An object that represents the control state to restore. 2.0.0.0 Property System.Web.UI.Themeable(false) System.Web.UI.WebControls.MailDefinition To be added. The property returns a reference to a group of properties that you use to define format and content of the password e-mail message sent to users. Common settings include the subject line and the sender's return address. For a complete list of properties, see the class. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form , where represents a property of the class (for example, MailDefinition-Subject). You can also set the properties programmatically in the form (for example, MailDefinition.Subject). This property cannot be set by themes or style sheet themes. For more information, see and ASP.NET Themes Overview. When the e-mail message is created from the object, it will make the substitutions shown in the following table. The substitution text is case-insensitive. Substitution text Replaced with <% %> The Web site user name of the user. <%Password%> The recovered password for the user. If the property of the object is true, the contents of the mail message will be HTML encoded to guard against cross-site scripting security vulnerabilities for the message recipient. Gets a reference to a collection of properties that define the characteristics of e-mail messages used to send new or recovered passwords to users. 2.0.0.0 Property System.Web.UI.Themeable(false) System.String To be added. The property identifies the membership provider used to verify user information entered in the control. Membership providers are defined in the Web.config file in the <membership> section. Setting the property will change the provider used. If you do not set the property, it will always return . This property cannot be set by themes or style sheet themes. For more information, see and ASP.NET Themes Overview. Gets or sets the membership provider used to look up user information. 2.0.0.0 Method System.Void The method is called when the user's answer to the password recovery confirmation question does not match the answer stored in the Web site data store. The default implementation raises the event. Raising an event invokes the event handler through a delegate. For more information, see Events and Delegates. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. An that contains the event data. 2.0.0.0 Method System.Boolean To be added. To be added. Implements the base method. The source of the event. The event data. 2.0.0.0 Method 2.0.0.0 System.Void To be added. Implements the base method. The event data. Method 2.0.0.0 System.Void To be added. Implements the base method. The event data. Method System.Void The method is called after the membership provider has verified that the user is a valid member of the Web site and before the recovered or new password is e-mailed to the user. The default implementation raises the event. Raising an event invokes the event handler through a delegate. For more information, see Events and Delegates. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. A that contains the event data. 2.0.0.0 Method System.Void The method is called when the SMTP Mail service throws an exception. The default implementation raises the error and, if the exception is not handled, rethrows the exception while maintaining the call stack. Examine the property of the object passed as the parameter to determine the actual cause of the exception. During development, the most common reason that the event is raised is that the <smtpMail> section of the Web.config file is incorrect. After deployment, this event can occur for a variety of reasons, most having to do with errors in an email address. You must set the property of the object passed as the parameter to true to signal that the exception has been handled; otherwise, the exception is thrown again. Raising an event invokes the event handler through a delegate. For more information, see Server Event Handling in ASP.NET Web Pages. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event when an e-mail message cannot be sent to the user. A that contains the event data. 2.0.0.0 Method System.Void The method is called when the membership provider is unable to find the user name entered on the initial screen. The default implementation raises the event. Raising an event invokes the event handler through a delegate. For more information, see Providing Event Functionality. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. An that contains the event data. 2.0.0.0 Method System.Void The method is called before the user's answer to the password recovery confirmation question is sent to the membership provider to be verified. The default implementation raises the event. Raising an event invokes the event handler through a delegate. For more information, see Events and Delegates. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. A that contains the event data. 2.0.0.0 Method System.Void The method is called after the user submits a user name on the initial screen and before the user name is validated by the membership provider. The default implementation raises the event. Raising an event invokes the event handler through a delegate. For more information, see Events and Delegates. The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Raises the event. A that contains the event data. 2.0.0.0 Property System.Web.UI.Themeable(false) System.String To be added. The property contains the password recovery confirmation question that the user previously established on the Web site. The property is displayed only in the Question view. If the membership provider specified in the property does not support password question and answer, the Question view is not displayed and the property is not used. The membership provider returns the question only after the user enters a valid user name. Until the user enters a valid user name, the property is . The style settings in the property define the appearance of the property. When you use the property to define the appearance of the Question view, the property is displayed in an optional control with the property set to "Question". This property cannot be set by themes or style sheet themes. For more information, see and ASP.NET Themes Overview. Gets the password recovery confirmation question established by the user on the Web site. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the error message that is displayed when the answer to the password recovery confirmation question does not match the answer stored in the Web site data store. The style settings in the property define the appearance of the property. When you use templates to define the appearance of the control, the property is displayed in an optional control with the property set to "FailureText". The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the text to display when the user's answer to the password recovery confirmation question does not match the answer stored in the Web site data store. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property is displayed in Question view to instruct the user to answer the password recovery confirmation question. The style settings in the property define the appearance of the property. When you use the property to define the appearance of the Question view, the property has no effect. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the text to display in the Question view to instruct the user to answer the password recovery confirmation question. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the label text for the password recovery confirmation question text box. The style settings contained in the property define the appearance of the property. When you use the property to define the appearance of the Question view, the property has no effect. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the text of the label for the text box. 2.0.0.0 Property System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.PasswordRecovery)) System.Web.UI.ITemplate To be added. The property contains the template that defines the appearance of the control in Question view. The following table lists the required and optional controls used in the Question view template. ID or Command name Control type Required/optional Answer Any control that implements . Required Submit Any control that causes event bubbling. Optional The Submit control can be any control that causes event bubbling, such as , , or . The control's command name property must be set to "Submit". The control throws an exception if the Question view does not contain the required controls. No exception is thrown if you give an optional control ID to a control of the wrong type; however, the control is subsequently ignored by the control. When you use a template to define the appearance of the Question view, only the following properties affect the behavior of the control: All properties inherited from (for details, see the control members table). . . . . . . . . . . . All other properties are inactive when you use a template for the Question view. Gets or sets the template used to display the Question view of the control. 2.0.0.0 Property System.Web.UI.Control To be added. To be added. Gets the container that a control used to create an instance of the template. This property provides programmatic access to child controls. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the text to display as the title of the Question view, which asks the user to answer the password confirmation question. The style settings in the property define the appearance of the text in the property. When you use the property to define the appearance of the Question view, the property has no effect. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the title for the Question view of the control. 2.0.0.0 Method 2.0.0.0 System.Void To be added. To be added. The that receives the rendered output. Method 2.0.0.0 System.Object To be added. To be added. Implements the base method. Method System.Object To be added. To be added. Implements the base method. 2.0.0.0 Event System.Web.UI.WebControls.MailMessageEventHandler The event occurs on the server after the user requests a new or recovered password and submits a correct answer to the password confirmation question (if your membership provider supports password question and answer), but before the password is sent to the user in e-mail. Use this event to do any special processing required before sending the e-mail message, such as setting properties. After the user enters a valid user name and, if relevant, a valid answer, the control raises the event, and then sends the password information to the user in e-mail. The e-mail uses the settings defined in the <smtpMail> configuration file element. For more information about handling events, see Consuming Events. Occurs before the user is sent a password in e-mail. 2.0.0.0 Event System.Web.UI.WebControls.SendMailErrorEventHandler The event is raised when the SMTP mail server throws an exception when trying to send an e-mail message. The default event does not handle the SMTP error from the mail system. The method that handles the event must set the property of the object to true to handle the error and prevent it from being displayed to the user. For more information about handling events, see Handling and Raising Events. Occurs when the SMTP Mail system throws an error while attempting to send an e-mail message. 2.0.0.0 Method System.Void To be added. Implements the base method. The design-time data for the control. 2.0.0.0 Field System.String This field is a string that represents the command to perform when the Submit button is clicked. The default is "Submit". This field is read-only. If you use a template with the control, you must use this command name for the action performed to submit the form or the control will not function properly. Represents the command to perform when the Submit button is clicked. 2.0.0.0 Property System.String To be added. The property contains the URL of the image to use for the Submit button when the property is set to . The property is used as the alternative text for the image in browsers that do not display images. When you use the or the property, the property has no effect. Gets or sets the URL of an image to use as the Submit button. 2.0.0.0 Property System.Web.UI.WebControls.Style To be added. The property defines the appearance of Submit buttons in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form , where represents a property of the class (for example, SubmitButtonStyle-ForeColor). You can also set the properties programmatically in the form (for example, SubmitButtonStyle.ForeColor). Common settings include custom background color, text color, and font properties. The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control. The following properties are overridden by settings: When you use templates to define the appearance of the initial or Question view of the control, the property has no effect. Gets a reference to a collection of properties that define the appearance of Submit buttons in the control. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the text displayed for the control's Submit button. How the property is used depends on the setting of the property. For details, see . When you use templates to define the appearance of the control, the property has no effect. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the text of the button that submits the form. 2.0.0.0 Property System.Web.UI.WebControls.ButtonType To be added. The property determines what kind of button is used to submit entries to the control. The following table lists the button type used for each value of the property. SubmitButtonType value Button used A standard HTML button. The property provides the text for the button. The image at the location stored in the property. The property provides the alternate text for the image. An HTML link. The property provides the link text. When you use templates to define the appearance of the control, the property has no effect. Gets or sets the type of Submit button to use when rendering the control. 2.0.0.0 Property System.Web.UI.Themeable(false) System.String To be added. The property contains the URL of the page that is displayed after a password has successfully been sent to a user. If the property is not null, the user is directed to the page defined in the property; otherwise, the page containing the control is refreshed. This property cannot be set by themes or style sheet themes. For more information, see and ASP.NET Themes Overview. Gets or sets the URL of the page to display after sending a password successfully. 2.0.0.0 Property System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.PasswordRecovery)) System.Web.UI.ITemplate To be added. The property contains the template that defines the appearance of the control in Success view. There are no required or optional fields for the Success view template. When you use a template to define the appearance of the Success view, only the following properties affect the behavior of the control: All properties inherited from (see the control members table). . . . . . . . . . . . All other properties are inactive when you use a template for the Success view of the control. Gets or sets the template used to display the Success view of the control. 2.0.0.0 Property System.Web.UI.Control To be added. This property can be used to programmatically access child controls when using a template. Gets the container that a control used to create an instance of the template. This property provides programmatic access to child controls. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property is displayed in the Success view when a password has been successfully sent to a user. The style settings in the property define the appearance of the property. When you use a template assigned to the property, the property has no effect. If the property is not null, the user is redirected to the page defined in the property, and the control's Success view is not shown to the user. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the text to display after sending a password successfully. 2.0.0.0 Property System.Web.UI.WebControls.TableItemStyle To be added. The property defines the appearance of text in the Success view of the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form , where represents a property of the class (for example, SuccessTextStyle-ForeColor). You can also set the properties programmatically in the form (for example, SuccessTextStyle.ForeColor). Common settings include custom background color, text color, and font properties. The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control. The following properties are overridden by settings: When you use templates to define the appearance of the Success view of the control, the property has no effect. Gets a reference to a collection of style properties that define the appearance of text displayed in the Success view of the control. 2.0.0.0 Property System.Web.UI.HtmlTextWriterTag To be added. Use the property to determine the value that is associated with a control. The property allows the output stream to write the appropriate HTML markup for the control. This property is used primarily by control developers. Gets the value that corresponds to a control. 2.0.0.0 Property System.Web.UI.WebControls.Style To be added. The property defines the appearance of text boxes in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form , where represents a property of the class (for example, TextBoxStyle-ForeColor). You can also set the properties programmatically in the form (for example, TextBoxStyle.ForeColor). Common settings include custom background color, text color, and font properties. The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control. The following properties are overridden by settings: When you use templates to define the appearance of the control, the property has no effect. Gets a reference to a collection of style properties that define the appearance of text boxes in the control. 2.0.0.0 Property System.Web.UI.WebControls.LoginTextLayout To be added. The property specifies where the control displays the field labels for the Answer, Question, and User Name text boxes. When the property is set to (the default), the field labels appear to the left of the text boxes. When is set to , the field labels appear above the text boxes. The text of the labels is specified in the , , and properties, respectively. The style settings for the field labels are specified in the property. Gets or sets a value that specifies whether to display the control in a horizontal or vertical layout. 2.0.0.0 Property System.Web.UI.WebControls.TableItemStyle To be added. The property defines the appearance of view title text in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form , where represents a property of the class (for example, TitleTextStyle-ForeColor). You can also set the properties programmatically in the form (for example, TitleTextStyle.ForeColor). Common settings include custom background color, text color, and font properties. The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control. The following properties are overridden by settings: When you use templates to define the appearance of the control, the property has no effect. Gets a reference to a collection of style properties that define the appearance of title text that appears in the control. 2.0.0.0 Method System.Void To be added. Implements the base method. 2.0.0.0 Event System.EventHandler The event is raised when the membership provider cannot find the user name entered by the user. For more information about handling events, see Events and Delegates. Occurs when the membership provider cannot find the user name entered by the user. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the user name entered by the user, or if the user has not entered a name. The property is used only in the UserName view. The property is saved in the control's control state to preserve the values between round trips to the server even when view state is turned off for the page. control properties represented by text boxes, such as , are accessible during all phases of the page life cycle. The control will pick up any changes made by the end user by means of the event triggered by the textboxes. The style settings in the property define the appearance of the text in the property. When you assign a template to the property to display the UserName view, the property is assigned the value entered in a required control with the property set to "UserName". The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the text that appears in the User Name text box. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the error message that is displayed when the user enters a user name that is not recognized by the membership provider defined in the property. The style settings in the property define the appearance of the text in the property. When you assign a template to the property, the property is displayed in an optional control with the property set to "FailureText". The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the text displayed when the user name entered by the user is not a valid user name for the Web site. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property is displayed in the UserName view to explain to the user how to use the control. The style settings in the property define the appearance of the text in the property. When using a template assigned to the property, the property is not displayed. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the text to display in the UserName view of the control to instruct the user to enter a user name. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the label text for the text box. The style settings in the property define the appearance of the property. When you assign a template to the property, the property has no effect. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the text of the label for the User Name text box. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the error message to display in any control on the same page as the control. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the error message displayed when a user leaves the User Name text box empty. 2.0.0.0 Property System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.PasswordRecovery)) System.Web.UI.ITemplate To be added. The property contains the template that defines the appearance of the control in UserName view. The following table lists the required and optional controls used in the UserName view template. ID or Command name Control type Required/optional UserName Any control that implements . Optional Submit Any control that causes event bubbling. Optional The Submit control can be any control that causes event bubbling, such as , , or . The control's CommandName property must be set to "Submit". The control throws an exception if the UserName view does not contain the required controls. No exception is thrown if you give an optional control ID to a control of the wrong type; however, the control is subsequently ignored by the control. When you use a template to define the appearance of the UserName view, only the following properties affect the behavior of the control: All properties inherited from (see the control members table). . . . . . . . All other properties are inactive when you use a template for the UserName view of the control. Gets or sets the template used to display the UserName view of the control. 2.0.0.0 Property System.Web.UI.Control To be added. This property can be used to programmatically access child controls when using a template. Gets the container that a control used to create an instance of the template. This property provides programmatic access to child controls. 2.0.0.0 Property System.ComponentModel.Localizable(true) System.String To be added. The property contains the text to display as the title of the UserName view, which asks the user to enter his or her user name. The style settings in the property define the appearance of the text in the property. When you use the property to define the appearance of the UserName view, the property has no effect. The default text for the property is localized based on the server's locale setting. The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization. Gets or sets the title for the UserName view of the control. 2.0.0.0 Property System.Web.UI.WebControls.Style To be added. The property defines the appearance of validation error messages in the control. This property is read-only; however, you can set the properties of the object it returns. You can set these properties declaratively in the form , where represents a property of the class (for example, FailureTextStyle-ForeColor). You can set the property programmatically in the form (for example, FailureTextStyle.ForeColor). Common settings include custom background color, text color, and font properties. The style settings for the property are merged with the style settings for the control. Any settings made in the property override the corresponding settings in properties of the control. Gets a reference to a collection of properties that define the appearance of error messages that are associated with any input validation used by the control. 2.0.0.0 Event System.Web.UI.WebControls.LoginCancelEventHandler The event occurs on the server after the user submits the answer to the password confirmation question. You can use this event to prepare the answer submitted by the user for the membership provider, for example by converting it to all uppercase or lowercase letters. The control first raises the event, and then uses the membership provider specified in the property to compare the answer entered by the user with the password stored in the Web site. For more information about handling events, see Events and Delegates. Occurs when the user has submitted an answer to the password recovery confirmation question. 2.0.0.0 Event System.Web.UI.WebControls.LoginCancelEventHandler The event is raised on the server before the user name is submitted to the membership provider to determine whether the user name is valid. Use this event to perform any preprocessing needed on the user name, such as converting it to all uppercase or lowercase letters, or verifying that the user name is in a particular format, such as an e-mail address. The control first raises the event, and then uses the membership provider specified in the property to determine whether the user name entered is a valid user name for the Web site. If it is valid, and the membership provider supports password question and answer, the password verification question is returned from the Web site and the control displays the Question view. If the user name is not valid, the text in the property is displayed in the UserName view so that the user can enter a different user name. If the membership provider does not support password question and answer, the event is raised and e-mail is sent to the user with the new or recovered password. For more information about handling events, see Events and Delegates. Occurs before the user name is validated by the membership provider. 2.0.0.0