PasswordRecovery::UserNameTemplate Property
Gets or sets the template used to display the UserName view of the PasswordRecovery control.
Assembly: System.Web (in System.Web.dll)
[TemplateContainerAttribute(typeof(PasswordRecovery))] [BrowsableAttribute(false)] [PersistenceModeAttribute(PersistenceMode::InnerProperty)] public: virtual property ITemplate^ UserNameTemplate { ITemplate^ get (); void set (ITemplate^ value); }
<asp:PasswordRecovery> <UserNameTemplate>ITemplate</UserNameTemplate> </asp:PasswordRecovery>
Property Value
Type: System.Web.UI::ITemplateAn ITemplate that contains the template for displaying the PasswordRecovery control in UserName view. The default is nullptr.
The UserNameTemplate property contains the template that defines the appearance of the PasswordRecovery 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 IEditableTextControl. | Optional |
Submit | Any control that causes event bubbling. | Optional |
The Submit control can be any control that causes event bubbling, such as Button, LinkButton, or ImageButton. The control's CommandName property must be set to "Submit".
The PasswordRecovery control throws an HttpException 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 PasswordRecovery 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 WebControl (see the PasswordRecovery control members table).
All other properties are inactive when you use a template for the UserName view of the PasswordRecovery control.
The following code example uses the UserNameTemplate property to define a template for the UserName view of the PasswordRecovery control that enables the user to choose the domain that contains his or her login information.
Security Note: |
|---|
This example contains a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview. |
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Security Note: