ChangePassword.ChangePasswordTemplate Property
Assembly: System.Web (in system.web.dll)
[TemplateContainerAttribute(typeof(ChangePassword))] public virtual ITemplate ChangePasswordTemplate { get; set; }
/** @property */ public ITemplate get_ChangePasswordTemplate () /** @property */ public void set_ChangePasswordTemplate (ITemplate value)
public function get ChangePasswordTemplate () : ITemplate public function set ChangePasswordTemplate (value : ITemplate)
Property Value
An ITemplate object that contains the template for displaying the ChangePassword control in the Change Password view. The default is a null reference (Nothing in Visual Basic).The ChangePasswordTemplate property specifies the ITemplate object used by the ChangePassword control. For more information, see How To: Create ASP.NET Web Server Control Templates Dynamically.
A template is a set of HTML elements and controls that make up the layout for a particular portion of a control. Templates differ from styles:
-
Templates define the content of a section of a control.
-
Styles specify the appearance of elements in the control.
For more information, see ASP.NET Web Server Controls Templates and ASP.NET Themes and Skins Overview.
The following table lists the templates and the corresponding control view that are supported by the ChangePassword control.
| Template name | Control view |
|---|---|
| ChangePasswordTemplate | Change Password |
| Success |
You can also create or modify the template for a control in your .aspx file. For more information, see How to: Create ASP.NET Web Control Templates Declaratively and How To: Create ASP.NET Web Server Control Templates Dynamically. The procedures in those topics do not require you to configure the ChangePasswordTemplate property. If you do configure the template, the following table lists the required and optional controls for the template.
| Control ID | Control type | Required/optional |
|---|---|---|
| Cancel | Any control that causes event bubbling (passing the event up the server control hierarchy), such as the Button, LinkButton, and ImageButton controls. The button command name must be set to the control ID. | Optional |
| ChangePassword | Any control that causes event bubbling (passing the event up the server control hierarchy), such as the Button, LinkButton, and ImageButton controls. The button command name must be set to the control ID. | Optional |
| ConfirmPassword | Any type that supports the IEditableTextControl interface, such as the TextBox class. | Optional |
| Continue | Any control that causes event bubbling (passing the event up the server control hierarchy), such as the Button, LinkButton, and ImageButton controls. The button command name must be set to the control ID. This control appears on the Success template. | Optional |
| CurrentPassword | Any type that supports the IEditableTextControl interface, such as the TextBox class. | Required |
| FailureText | Any type that supports the ITextControl interface. | Optional |
| NewPassword | Any type that supports the IEditableTextControl interface, such as the TextBox class. | Required |
| UserName | Any type that supports the IEditableTextControl interface. | Required if DisplayUserName is true. Must be absent if DisplayUserName is false. |
The ChangePassword control throws an HttpException exception if the template 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 ChangePassword control.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Reference
ChangePassword ClassChangePassword Members
System.Web.UI.WebControls Namespace
SuccessTemplate
Login
Other Resources
ASP.NET Login Controls OverviewCustomizing the Appearance of ASP.NET Login Controls
ASP.NET Web Server Controls Templates
ASP.NET Themes and Skins Overview
How To: Create ASP.NET Web Server Control Templates Dynamically
How to: Create ASP.NET Web Control Templates Declaratively
How to: Display Different Information to Anonymous and Logged-in Users
Web Site Administration Tool Security Tab