ChangePassword Class
 

Provides a user interface that enable users to change their Web site password.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

SystemObject
   System.Web.UIControl
     System.Web.UI.WebControlsWebControl
       System.Web.UI.WebControlsCompositeControl
        System.Web.UI.WebControlsChangePassword

[BindableAttribute(false)]
public class ChangePassword : CompositeControl, INamingContainer
[BindableAttribute(false)]
public ref class ChangePassword : CompositeControl, INamingContainer
[<BindableAttribute(false)>]
type ChangePassword = 
    class
        inherit CompositeControl
        interface INamingContainer
    end
<BindableAttribute(False)>
Public Class ChangePassword
	Inherits CompositeControl
	Implements INamingContainer
NameDescription
System_CAPS_pubmethod ChangePassword

Initializes a new instance of the ChangePassword class.

NameDescription
System_CAPS_pubproperty

Gets or sets the access key that allows you to quickly navigate to the Web server control.(Inherited from WebControl.)

System_CAPS_protproperty

Gets the browser-specific adapter for the control.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets the application-relative virtual directory of the Page or UserControl object that contains this control.(Inherited from Control.)

System_CAPS_pubproperty

Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets the background color of the Web server control.(Inherited from WebControl.)

System_CAPS_pubproperty

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the control that contains this control's data binding.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets the border color of the Web control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets the amount of padding, in pixels, inside the border and the designated area for the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the border style of the Web server control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets the border width of the Web server control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets the URL of an image to display with the Cancel button, if the Cancel button is configured by the property to be an image button.

System_CAPS_pubproperty

Gets a reference to a collection of Style properties that define the appearance of the Cancel button on the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the text displayed on the Cancel button.

System_CAPS_pubproperty

Gets or sets the type of button to use for the Cancel button when rendering the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the URL of the page that the user is shown after clicking the Cancel button in the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the URL of an image displayed next to the Change Password button on the ChangePassword control if the Change Password button is configured by the property to be an image button.

System_CAPS_pubproperty

Gets a reference to a collection of Style properties that define the appearance of the Change Password button on the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the text displayed on the Change Password button.

System_CAPS_pubproperty

Gets or sets the type of button to use when rendering the Change Password button of the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the message that is shown when the user's password is not changed.

System_CAPS_pubproperty

Gets or sets the ITemplate object used to display the Change Password view of the ChangePassword control.

System_CAPS_pubproperty

Gets the container that a ChangePassword control uses to create an instance of the template. This provides programmatic access to child controls.

System_CAPS_pubproperty

Gets or sets the text displayed at the top of the ChangePassword control in Change Password view.

System_CAPS_protproperty

Gets a value that indicates whether the server control's child controls have been created.(Inherited from Control.)

System_CAPS_pubproperty

Gets the control ID for HTML markup that is generated by ASP.NET.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets the algorithm that is used to generate the value of the property.(Inherited from Control.)

System_CAPS_protproperty

Gets a character value representing the separator character used in the property.(Inherited from Control.)

System_CAPS_pubproperty

Gets the duplicate password entered by the user.

System_CAPS_pubproperty

Gets or sets the label text for the text box.

System_CAPS_pubproperty

Gets or sets the message that is displayed when the new password and the duplicate password entered by the user are not identical.

System_CAPS_pubproperty

Gets or sets the error message that is displayed when the Confirm New Password text box is left empty.

System_CAPS_protproperty

Gets the HttpContext object associated with the server control for the current Web request.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets the URL of an image to use for the Continue button on the Success view of the ChangePassword control if the Continue button is configured by the property to be an image button.

System_CAPS_pubproperty

Gets a reference to a collection of Style properties that define the appearance of the Continue button on the Success view of the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the text that is displayed on the Continue button on the Success view of the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the type of button to use when rendering the Continue button for the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the URL of the page that the user will see after clicking the Continue button on the Success view.

System_CAPS_pubproperty

Gets a ControlCollection object that represents the child controls in a CompositeControl.(Inherited from CompositeControl.)

System_CAPS_pubproperty

Gets the style of the Web server control. This property is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets a value indicating whether a Style object has been created for the property. This property is primarily used by control developers.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets the URL of an image to display next to the link to the Web page that contains a CreateUserWizard control for the Web site.

System_CAPS_pubproperty

Gets or sets the text of the link to the Web page that contains a CreateUserWizard control for the Web site.

System_CAPS_pubproperty

Gets or sets the URL of the Web page that contains a CreateUserWizard control for the Web site.

System_CAPS_pubproperty

Gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets the current password for the user.

System_CAPS_pubproperty

Gets a reference to the naming container if the naming container implements IDataItemContainer.(Inherited from Control.)

System_CAPS_pubproperty

Gets a reference to the naming container if the naming container implements IDataKeysControl.(Inherited from Control.)

System_CAPS_protproperty

Gets a value indicating whether a control is being used on a design surface.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets a value indicating whether the ChangePassword control should display the control and label.

System_CAPS_pubproperty

Gets or sets the URL of an image to display next to the link to the user profile editing page for the Web site.

System_CAPS_pubproperty

Gets or sets the text of the link to the user profile editing page for the Web site.

System_CAPS_pubproperty

Gets or sets the URL of the user profile editing page for the Web site.

System_CAPS_pubproperty

Gets or sets a value indicating whether the Web server control is enabled.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets a value indicating whether themes apply to this control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.(Inherited from Control.)

System_CAPS_protproperty

Gets a list of event handler delegates for the control. This property is read-only.(Inherited from Control.)

System_CAPS_pubproperty

Gets a reference to a collection of Style properties that define the appearance of error messages on the ChangePassword control.

System_CAPS_pubproperty

Gets the font properties associated with the Web server control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets the foreground color (typically the color of the text) of the Web server control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets a value indicating whether the control has attributes set.(Inherited from WebControl.)

System_CAPS_protproperty

Gets a value indicating whether the current server control's child controls have any saved view-state settings.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets the height of the Web server control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets the URL of an image to display next to the Change Password help page for the Web site.

System_CAPS_pubproperty

Gets or sets the link text to the Change Password help page for the Web site.

System_CAPS_pubproperty

Gets or sets the URL of the Change Password help page for the Web site.

System_CAPS_pubproperty

Gets a reference to a collection of Style properties that define the appearance of hyperlinks on the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the programmatic identifier assigned to the server control.(Inherited from Control.)

System_CAPS_protproperty

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the character used to separate control identifiers.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets informational text that appears on the ChangePassword control between the and the input boxes.

System_CAPS_pubproperty

Gets a reference to a collection of Style properties that define the appearance of the instructional text on the ChangePassword control.

System_CAPS_protproperty

Gets a value indicating whether controls contained within this control have control state.(Inherited from Control.)

System_CAPS_protproperty

Gets a value indicating whether the control is enabled.(Inherited from WebControl.)

System_CAPS_protproperty

Gets a value that indicates whether the server control is saving changes to its view state.(Inherited from Control.)

System_CAPS_protproperty

Gets a value indicating whether view state is enabled for this control.(Inherited from Control.)

System_CAPS_pubproperty

Gets a reference to a collection of Style objects that define the appearance of text box labels on the ChangePassword control.

System_CAPS_protproperty

Gets a value indicating whether the control participates in loading its view state by instead of index. (Inherited from Control.)

System_CAPS_pubproperty

Gets a reference to a collection of properties that define the e-mail message that is sent to users after they have changed their password.

System_CAPS_pubproperty

Gets or sets the membership provider that is used to manage member information.

System_CAPS_pubproperty

Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same property value.(Inherited from Control.)

System_CAPS_pubproperty

Gets the new password entered by the user.

System_CAPS_pubproperty

Gets or sets the label text for the New Password text box.

System_CAPS_pubproperty

Gets or sets the regular expression that is used to validate the password provided by the user.

System_CAPS_pubproperty

Gets or sets the error message that is shown when the password entered does not pass the regular expression criteria defined in the property.

System_CAPS_pubproperty

Gets or sets the error message that is displayed when the user leaves the New Password text box empty.

System_CAPS_pubproperty

Gets a reference to the Page instance that contains the server control.(Inherited from Control.)

System_CAPS_pubproperty

Gets a reference to the server control's parent control in the page control hierarchy.(Inherited from Control.)

System_CAPS_pubproperty

Gets a reference to a collection of Style properties that define the appearance of hint text that appears on the ChangePassword control.

System_CAPS_pubproperty

Gets or sets informational text about the requirements for creating a password for the Web site.

System_CAPS_pubproperty

Gets or sets the label text for the Current Password text box.

System_CAPS_pubproperty

Gets or sets the URL of an image to display next to a link to the Web page that contains the PasswordRecovery control.

System_CAPS_pubproperty

Gets or sets the text of the link to the Web page that contains the PasswordRecovery control.

System_CAPS_pubproperty

Gets or sets the URL of the Web page that contains the PasswordRecovery control.

System_CAPS_pubproperty

Gets or sets the error message that is displayed when the user leaves the Current Password text box empty.

System_CAPS_pubproperty

Gets a value that specifies the ASP.NET version that rendered HTML will be compatible with.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets a value that indicates whether the control encloses rendered HTML in a table element in order to apply inline styles.

System_CAPS_pubproperty

Gets information about the container that hosts the current control when rendered on a design surface.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets the skin to apply to the control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets the URL of the page that is shown to users after they have changed their password successfully.

System_CAPS_pubproperty

Gets or sets the ITemplate object that is used to display the Success and Change Password views of the ChangePassword control.

System_CAPS_pubproperty

Gets the container that a ChangePassword control used to create an instance of the template. This provides programmatic access to child controls.

System_CAPS_pubproperty

Gets or sets the text that is displayed on the Success view between the and the Continue button.

System_CAPS_pubproperty

Gets a collection of Style properties that define the appearance of text on the Success view.

System_CAPS_pubproperty

Gets or sets the title of the Success view.

System_CAPS_pubproperty

Gets a value that indicates whether the control should set the disabled attribute of the rendered HTML element to "disabled" when the control's property is false.(Inherited from CompositeControl.)

System_CAPS_pubproperty

Gets or sets the tab index of the Web server control.(Inherited from WebControl.)

System_CAPS_protproperty

Gets the HtmlTextWriterTag value that corresponds to a ChangePassword control. This property is used primarily by control developers.(Overrides .)

System_CAPS_protproperty

Gets the name of the control tag. This property is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets or sets a reference to the template that contains this control. (Inherited from Control.)

System_CAPS_pubproperty

Gets the virtual directory of the Page or UserControl that contains the current server control.(Inherited from Control.)

System_CAPS_pubproperty

Gets a reference to a collection of Style properties that define the appearance of text box controls on the ChangePassword control.

System_CAPS_pubproperty

Gets a reference to a collection of Style properties that define the appearance of titles on the ChangePassword control.

System_CAPS_pubproperty

Gets or sets the text displayed when the mouse pointer hovers over the Web server control.(Inherited from WebControl.)

System_CAPS_pubproperty

Gets the unique, hierarchically qualified identifier for the server control.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets the Web site user name for which to change the password.

System_CAPS_pubproperty

Gets or sets the label for the User Name text box.

System_CAPS_pubproperty

Gets or sets the error message that is displayed when the user leaves the User Name text box empty.

System_CAPS_pubproperty

Gets or sets a value that indicates whether the control checks client input from the browser for potentially dangerous values.(Inherited from Control.)

System_CAPS_pubproperty

Gets a reference to a collection of Style properties that define the appearance of error messages that are associated with any input validation used by the ChangePassword control.

System_CAPS_protproperty

Gets a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page.(Inherited from Control.)

System_CAPS_protproperty

Gets a value that indicates whether the StateBag object is case-insensitive.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets the view-state mode of this control.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets a value that indicates whether a server control is rendered as UI on the page.(Inherited from Control.)

System_CAPS_pubproperty

Gets or sets the width of the Web server control.(Inherited from WebControl.)

NameDescription
System_CAPS_protmethod AddAttributesToRender

Adds HTML attributes and styles that need to be rendered to the specified HtmlTextWriterTag. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_protmethod AddedControl

Called after a child control is added to the collection of the Control object.(Inherited from Control.)

System_CAPS_protmethod AddParsedSubObject

Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's ControlCollection object.(Inherited from Control.)

System_CAPS_pubmethod ApplyStyle

Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.(Inherited from WebControl.)

System_CAPS_pubmethod ApplyStyleSheetSkin

Applies the style properties defined in the page style sheet to the control.(Inherited from Control.)

System_CAPS_protmethod BeginRenderTracing

Begins design-time tracing of rendering data.(Inherited from Control.)

System_CAPS_protmethod BuildProfileTree

This API supports the product infrastructure and is not intended to be used directly from your code. Gathers information about the server control and delivers it to the property to be displayed when tracing is enabled for the page.(Inherited from Control.)

System_CAPS_protmethod ClearCachedClientID

This API supports the product infrastructure and is not intended to be used directly from your code. Sets the cached value to null.(Inherited from Control.)

System_CAPS_protmethod ClearChildControlState

Deletes the control-state information for the server control's child controls. (Inherited from Control.)

System_CAPS_protmethod ClearChildState

Deletes the view-state and control-state information for all the server control's child controls.(Inherited from Control.)

System_CAPS_protmethod ClearChildViewState

Deletes the view-state information for all the server control's child controls.(Inherited from Control.)

System_CAPS_protmethod ClearEffectiveClientIDMode

This API supports the product infrastructure and is not intended to be used directly from your code. Sets the property of the current control instance and of any child controls to Inherit.(Inherited from Control.)

System_CAPS_pubmethod CopyBaseAttributes

Copies the properties not encapsulated by the object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_protmethod CreateChildControls

Creates the individual controls that make up the ChangePassword control in preparation for posting back or rendering.(Overrides ControlCreateChildControls.)

System_CAPS_protmethod CreateControlCollection

Creates a new ControlCollection object to hold the child controls (both literal and server) of the server control.(Inherited from Control.)

System_CAPS_protmethod CreateControlStyle

Creates the style object that is used internally by the WebControl class to implement all style related properties. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_pubmethod DataBind

Binds a data source to the CompositeControl and all its child controls.(Inherited from CompositeControl.)

System_CAPS_protmethod DataBind

Binds a data source to the invoked server control and all its child controls with an option to raise the DataBinding event. (Inherited from Control.)

System_CAPS_protmethod DataBindChildren

Binds a data source to the server control's child controls.(Inherited from Control.)

System_CAPS_pubmethod Dispose

Enables a server control to perform final clean up before it is released from memory.(Inherited from Control.)

System_CAPS_protmethod EndRenderTracing

Ends design-time tracing of rendering data.(Inherited from Control.)

System_CAPS_protmethod EnsureChildControls

Determines whether the server control contains child controls. If it does not, it creates child controls.(Inherited from Control.)

System_CAPS_protmethod EnsureID

Creates an identifier for controls that do not have an identifier assigned.(Inherited from Control.)

System_CAPS_pubmethod Equals

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethod Finalize

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethod FindControl

Searches the current naming container for a server control with the specified id parameter.(Inherited from Control.)

System_CAPS_protmethod FindControl

This API supports the product infrastructure and is not intended to be used directly from your code. Searches the current naming container for a server control with the specified id and an integer, specified in the pathOffset parameter, which aids in the search. You should not override this version of the FindControl method.(Inherited from Control.)

System_CAPS_pubmethod Focus

Sets input focus to a control.(Inherited from Control.)

System_CAPS_protmethod GetDesignModeState

This API supports the product infrastructure and is not intended to be used directly from your code. Gets design-time data for a control.(Inherited from Control.)

System_CAPS_pubmethod GetHashCode

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethod GetRouteUrl

Gets the URL that corresponds to a set of route parameters.(Inherited from Control.)

System_CAPS_pubmethod GetRouteUrl

Gets the URL that corresponds to a set of route parameters.(Inherited from Control.)

System_CAPS_pubmethod GetRouteUrl

Gets the URL that corresponds to a set of route parameters and a route name.(Inherited from Control.)

System_CAPS_pubmethod GetRouteUrl

Gets the URL that corresponds to a set of route parameters and a route name.(Inherited from Control.)

System_CAPS_pubmethod GetType

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethod GetUniqueIDRelativeTo

Returns the prefixed portion of the property of the specified control.(Inherited from Control.)

System_CAPS_pubmethod HasControls

Determines if the server control contains any child controls.(Inherited from Control.)

System_CAPS_protmethod HasEvents

Returns a value indicating whether events are registered for the control or any child controls.(Inherited from Control.)

System_CAPS_protmethod IsLiteralContent

This API supports the product infrastructure and is not intended to be used directly from your code. Determines if the server control holds only literal content.(Inherited from Control.)

System_CAPS_protmethod LoadControlState

Restores control state information from a previous page request that was saved by the SaveControlState method.(Overrides ControlLoadControlState.)

System_CAPS_protmethod LoadViewState

Restores view state information from a previous page request that was saved by the SaveViewState method.(Overrides WebControlLoadViewState.)

System_CAPS_protmethod MapPathSecure

Retrieves the physical path that a virtual path, either absolute or relative, maps to.(Inherited from Control.)

System_CAPS_protmethod MemberwiseClone

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethod MergeStyle

Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_protmethod OnBubbleEvent

Determines whether the event for the ChangePassword control is passed up the Web server control hierarchy for the page.(Overrides ControlOnBubbleEvent.)

System_CAPS_protmethod OnCancelButtonClick

Raises the CancelButtonClick event when a user clicks the Cancel button.

System_CAPS_protmethod OnChangedPassword

Raises the ChangedPassword event after the password is changed.

System_CAPS_protmethod OnChangePasswordError

Raises the ChangePasswordError event when the user's password is not changed.

System_CAPS_protmethod OnChangingPassword

Raises the ChangingPassword event before the user's password is changed by the membership provider.

System_CAPS_protmethod OnContinueButtonClick

Raises the ContinueButtonClick event when a user clicks the Continue button.

System_CAPS_protmethod OnDataBinding

Raises the DataBinding event.(Inherited from Control.)

System_CAPS_protmethod OnInit

Raises the Init event for the ChangePassword control to allow the control to register itself with the page.(Overrides ControlOnInit.)

System_CAPS_protmethod OnLoad

Raises the Load event.(Inherited from Control.)

System_CAPS_protmethod OnPreRender

Raises the PreRender event.(Overrides ControlOnPreRender.)

System_CAPS_protmethod OnSendingMail

Raises the SendingMail event before an e-mail message is sent to the SMTP server for processing. The SMTP server then sends the e-mail message to the user.

System_CAPS_protmethod OnSendMailError

Raises the SendMailError event when an e-mail message cannot be sent to the user.

System_CAPS_protmethod OnUnload

Raises the Unload event.(Inherited from Control.)

System_CAPS_protmethod OpenFile

Gets a Stream used to read a file.(Inherited from Control.)

System_CAPS_protmethod RaiseBubbleEvent

Assigns any sources of the event and its information to the control's parent.(Inherited from Control.)

System_CAPS_protmethod RecreateChildControls

Recreates the child controls in a control derived from CompositeControl. (Inherited from CompositeControl.)

System_CAPS_protmethod RemovedControl

Called after a child control is removed from the collection of the Control object.(Inherited from Control.)

System_CAPS_protmethod Render

This API supports the product infrastructure and is not intended to be used directly from your code. Writes the ChangePassword control content to the specified HtmlTextWriter object, for display on the client.(Overrides CompositeControlRender.)

System_CAPS_pubmethod RenderBeginTag

Renders the HTML opening tag of the control to the specified writer. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_protmethod RenderChildren

Outputs the content of a server control's children to a provided HtmlTextWriter object, which writes the content to be rendered on the client.(Inherited from Control.)

System_CAPS_protmethod RenderContents

Renders the contents of the control to the specified writer. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_pubmethod RenderControl

Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.(Inherited from Control.)

System_CAPS_protmethod RenderControl

Outputs server control content to a provided HtmlTextWriter object using a provided ControlAdapter object.(Inherited from Control.)

System_CAPS_pubmethod RenderEndTag

Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_protmethod ResolveAdapter

Gets the control adapter responsible for rendering the specified control.(Inherited from Control.)

System_CAPS_pubmethod ResolveClientUrl

Gets a URL that can be used by the browser.(Inherited from Control.)

System_CAPS_pubmethod ResolveUrl

Converts a URL into one that is usable on the requesting client.(Inherited from Control.)

System_CAPS_protmethod SaveControlState

Saves any server control state changes that have occurred since the time the page was posted back to the server.(Overrides ControlSaveControlState.)

System_CAPS_protmethod SaveViewState

Saves any server control view state changes that have occurred since the time the page was posted back to the server.(Overrides WebControlSaveViewState.)

System_CAPS_protmethod SetDesignModeState

Sets design-time data for a control.(Overrides ControlSetDesignModeState.)

System_CAPS_pubmethod SetRenderMethodDelegate

This API supports the product infrastructure and is not intended to be used directly from your code. Assigns an event handler delegate to render the server control and its content into its parent control.(Inherited from Control.)

System_CAPS_pubmethod SetTraceData

Sets trace data for design-time tracing of rendering data, using the trace data key and the trace data value.(Inherited from Control.)

System_CAPS_pubmethod SetTraceData

Sets trace data for design-time tracing of rendering data, using the traced object, the trace data key, and the trace data value.(Inherited from Control.)

System_CAPS_pubmethod ToString

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_protmethod TrackViewState

Causes tracking of view-state changes to the server control so that they can be stored in the server control's StateBag object. This object is accessible through the property. (Overrides WebControlTrackViewState.)

NameDescription
System_CAPS_pubfield System_CAPS_static CancelButtonCommandName

Represents the CommandName value of the Cancel button. This field is read-only.

System_CAPS_pubfield System_CAPS_static ChangePasswordButtonCommandName

Represents the CommandName value of the Change Password button. This field is read-only.

System_CAPS_pubfield System_CAPS_static ContinueButtonCommandName

Represents CommandName value of the Continue button. This field is read-only.

NameDescription
System_CAPS_pubevent CancelButtonClick

Occurs when the user clicks the Cancel button to cancel changing a password.

System_CAPS_pubevent ChangedPassword

Occurs when the password is changed for a user account.

System_CAPS_pubevent ChangePasswordError

Occurs when there is an error changing the password for the user account.

System_CAPS_pubevent ChangingPassword

Occurs before the password for a user account is changed by the membership provider.

System_CAPS_pubevent ContinueButtonClick

Raises the ContinueButtonClick event when the user clicks the Continue button.

System_CAPS_pubevent DataBinding

Occurs when the server control binds to a data source.(Inherited from Control.)

System_CAPS_pubevent Disposed

Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.(Inherited from Control.)

System_CAPS_pubevent Init

Occurs when the server control is initialized, which is the first step in its lifecycle.(Inherited from Control.)

System_CAPS_pubevent Load

Occurs when the server control is loaded into the Page object.(Inherited from Control.)

System_CAPS_pubevent PreRender

Occurs after the Control object is loaded but prior to rendering.(Inherited from Control.)

System_CAPS_pubevent SendingMail

Occurs before the user is sent an e-mail confirmation that the password has been changed.

System_CAPS_pubevent SendMailError

Occurs when there is an SMTP error sending an e-mail message to the user.

System_CAPS_pubevent Unload

Occurs when the server control is unloaded from memory.(Inherited from Control.)

NameDescription
System_CAPS_pubinterface System_CAPS_privmethod IAttributeAccessorGetAttribute

This API supports the product infrastructure and is not intended to be used directly from your code. Gets an attribute of the Web control with the specified name.(Inherited from WebControl.)

System_CAPS_pubinterface System_CAPS_privmethod IAttributeAccessorSetAttribute

Sets an attribute of the Web control to the specified name and value.(Inherited from WebControl.)

System_CAPS_pubinterface System_CAPS_privmethod IControlDesignerAccessorGetDesignModeState

For a description of this member, see IControlDesignerAccessorGetDesignModeState.(Inherited from Control.)

System_CAPS_pubinterface System_CAPS_privmethod IControlDesignerAccessorSetDesignModeState

For a description of this member, see IControlDesignerAccessorSetDesignModeState. (Inherited from Control.)

System_CAPS_pubinterface System_CAPS_privmethod IControlDesignerAccessorSetOwnerControl

This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IControlDesignerAccessorSetOwnerControl. (Inherited from Control.)

System_CAPS_pubinterface System_CAPS_privmethod IParserAccessorAddParsedSubObject

For a description of this member, see IParserAccessorAddParsedSubObject. (Inherited from Control.)

System_CAPS_pubinterface System_CAPS_privmethod ICompositeControlDesignerAccessorRecreateChildControls

Enables a designer to recreate the composite control's collection of child controls in the design-time environment.(Inherited from CompositeControl.)

System_CAPS_pubinterface System_CAPS_privproperty

For a description of this member, see . (Inherited from Control.)

System_CAPS_pubinterface System_CAPS_privproperty

For a description of this member, see . (Inherited from Control.)

System_CAPS_pubinterface System_CAPS_privproperty

For a description of this member, see . (Inherited from Control.)

System_CAPS_pubinterface System_CAPS_privproperty

For a description of this member, see . (Inherited from Control.)

System_CAPS_pubinterface System_CAPS_privproperty

For a description of this member, see . (Inherited from Control.)

System_CAPS_pubinterface System_CAPS_privproperty

For a description of this member, see . (Inherited from Control.)

NameDescription
System_CAPS_pubmethod EnableDynamicData

Overloaded. Enables Dynamic Data behavior for the specified data control.(Defined by DataControlExtensions.)

System_CAPS_pubmethod EnableDynamicData

Overloaded. Enables Dynamic Data behavior for the specified data control.(Defined by DataControlExtensions.)

System_CAPS_pubmethod EnableDynamicData

Overloaded. Enables Dynamic Data behavior for the specified data control.(Defined by DataControlExtensions.)

System_CAPS_pubmethod FindDataSourceControl

Returns the data source that is associated with the data control for the specified control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethod FindFieldTemplate

Returns the field template for the specified column in the specified control's naming container.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethod FindMetaTable

Returns the metatable object for the containing data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethod GetDefaultValues

Overloaded. Gets the collection of the default values for the specified data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethod GetMetaTable

Overloaded. Gets the table metadata for the specified data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethod SetMetaTable

Overloaded. Sets the table metadata for the specified data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethod SetMetaTable

Overloaded. Sets the table metadata and default value mapping for the specified data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethod SetMetaTable

Overloaded. Sets the table metadata and default value mapping for the specified data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethod TryGetMetaTable

Overloaded. Determines whether table metadata is available.(Defined by DynamicDataExtensions.)

In this topic:

  • Introduction

  • Sending E-mail Messages

  • Views

  • Styles and Templates

  • Validation Groupings

  • Access Keys and Tab Indexes

  • Accessibility

  • Accessing Controls During Page_Load and Page_Init

  • Applying CSS Styles

  • Declarative Syntax#

Use the ChangePassword control on a page to enable your Web site users to change the passwords they use to log on to your Web site.

System_CAPS_noteNote

If you are not familiar with the set of login controls available in ASP.NET, read 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.

System_CAPS_security Security Note

Transmitting passwords over HTTP is a potential security threat. HTTP transmissions can be viewed or compromised by malicious users. To improve security when using login controls, you should use HTTPS protocol with secure sockets layer (SSL) encryption to ensure that the user's password cannot be read during postback. For more information, see Securing Login Controls.

The ChangePassword control uses the membership provider defined in the property to change the password stored in the membership provider data store for the Web site. If you do not assign a membership provider, the ChangePassword control uses the default membership provider defined in the section of the Web.config file. The ChangePassword control enables users to perform the following actions:

  • Change their password if they are logged on.

  • Change their password if they are not logged on, as long as the page that contains the ChangePassword control allows anonymous access and the property is true.

  • Change the password for a user account, even if they are logged on as a different user. This requires the property to be true.

Setting the property to true displays the User Name text box, which allows the user to type in a user name. If the user is logged on, the control is populated with the name of the logged-on user. After the password for the given user name is changed, the user is logged on to the account associated with the changed password, even if the user was not logged on to that account previously.

System_CAPS_security Security Note

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 ChangePassword control can be configured to use e-mail services to send the new password to the user. To send e-mail messages to users from any of ASP.NET Web server controls, you must configure an e-mail server in the Web.config file for your application. For more information, see NIB: How to: Install and Configure SMTP Virtual Servers in IIS 6.0.

E-mail messages are configured using the MailDefinition class. You must set the property to instruct ASP.NET to send e-mail.

System_CAPS_security Security Note

Sending user account names or passwords in e-mail is a potential security threat. E-mail messages are typically sent in plain text and can be read by special network "sniffing" applications. To improve security, use the mitigations that are described in Securing Login Controls.

System_CAPS_noteNote

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 message, provide a confirmation link in the e-mail message that lets the user confirm that the notification was received.

The ChangePassword control has two states, or views:

  • Change Password view   Requests the current password, and requires the user to type the new password twice for confirmation. If you allow users who are not logged on to change their passwords, set the property to true to display the control in Change Password view. The control allows the user to provide their registered user name. If there is an error when changing the password, an error message is displayed in the Change Password view, allowing the user to try again.

  • Success view   Provides confirmation that the password has been changed.

    System_CAPS_importantImportant

    The functionality for changing passwords and for continue and cancel is attached to any button that has the correct command name, regardless of which view the button is placed on. For example, a button with the value commandname=changepassword in the Success view will attempt to change the password and result in an exception.

You can use an extensive set of style properties to customize the appearance of the ChangePassword control. Alternatively, you can apply custom templates to the two views if you need complete control over the appearance of the ChangePassword control. If you define a template for a view, the properties are applied. For a list of the controls that you must set in the view templates, see the and properties. The ChangePassword control examines the content in the template and throws an exception if a required control is not found, is not named correctly, or is of the wrong type. For example, if you use the content in the template and set the property to true, the ChangePassword will throw an exception if a TextBox or some other IEditableTextControl control is not found for the user name.

The following table lists the ChangePassword control style properties and describes which UI element they affect. For a list of the properties to which each style applies, see the individual style property.

ChangePassword style property

UI element

Cancel button on the Change Password view.

Change Password button on the Change Password view.

Continue button on the Success view.

Error text displayed to the user.

Hyperlinks to other pages.

Instructional text on the page that describes how to use the ChangePassword control.

Labels for all input fields, such as text boxes.

Hints for providing an acceptable password for the Web site.

Text displayed to the user when the password has been successfully changed.

Text entry input fields.

Titles for the Change Password and Success views.

The ChangePassword control lets you specify CSS style rules in markup. If you use templates to customize the appearance of the ChangePassword 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.

The ChangePassword control uses a validation group so that other fields on the same page as the ChangePassword control can be validated separately. By default, the property of the ChangePassword control is used as the name of the validation group. For example, a ChangePassword control with the ID "ChangePassword1" will use a validation group name of ChangePassword1 as well. To set the validation group that the ChangePassword control is part of, you must create a template with the control, and then change the validation group name.

To show error messages if a user leaves a TextBox control empty, add a ValidationSummary control to the page. Set the property of the ValidationSummary control to the property of the ChangePassword control.

For information about how to use the property and the property of a ChangePassword control, see Accessibility in Visual Studio and ASP.NET and ASP.NET Controls and Accessibility.

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

ChangePassword control properties represented by text boxes, such as and , are accessible during all phases of the page life cycle. In particular, during the Page_Init and Page_Load phases, these properties have the same value they had when the ChangePassword control was rendered. If the user changes the value of the property by modifying the text box, the new value will be available when the changed event is raised, which occurs after the Page_Load phase. Therefore, if you set the value of the property in the Page_Init phase or Page_Load phase and provide a custom handler for a ChangePassword event, any change that the user makes in the text box overrides the value set in the Page_Init or Page_Load phase.

<asp:ChangePassword
    AccessKey="string"
    BackColor="color name|#dddddd"
    BorderColor="color name|#dddddd"
    BorderPadding="integer"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
        Inset|Outset"
    BorderWidth="size"
    CancelButtonImageUrl="uri"
    CancelButtonText="string"
    CancelButtonType="Button|Image|Link"
    CancelDestinationPageUrl="uri"
    ChangePasswordButtonImageUrl="uri"
    ChangePasswordButtonText="string"
    ChangePasswordButtonType="Button|Image|Link"
    ChangePasswordFailureText="string"
    ChangePasswordTitleText="string"
    ConfirmNewPasswordLabelText="string"
    ConfirmPasswordCompareErrorMessage="string"
    ConfirmPasswordRequiredErrorMessage="string"
    ContinueButtonImageUrl="uri"
    ContinueButtonText="string"
    ContinueButtonType="Button|Image|Link"
    ContinueDestinationPageUrl="uri"
    CreateUserIconUrl="uri"
    CreateUserText="string"
    CreateUserUrl="uri"
    CssClass="string"
    DisplayUserName="True|False"
    EditProfileIconUrl="uri"
    EditProfileText="string"
    EditProfileUrl="uri"
    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"
    Height="size"
    HelpPageIconUrl="uri"
    HelpPageText="string"
    HelpPageUrl="uri"
    ID="string"
    InstructionText="string"
    MailDefinition-BodyFileName="uri"
    MailDefinition-CC="string"
    MailDefinition-From="string"
    MailDefinition-IsBodyHtml="True|False"
    MailDefinition-Priority="Normal|Low|High"
    MailDefinition-Subject="string"
    MembershipProvider="string"
    NewPasswordLabelText="string"
    NewPasswordRegularExpression="string"
    NewPasswordRegularExpressionErrorMessage="string"
    NewPasswordRequiredErrorMessage="string"
    OnCancelButtonClick="CancelButtonClick event handler"
    OnChangedPassword="ChangedPassword event handler"
    OnChangePasswordError="ChangePasswordError event handler"
    OnChangingPassword="ChangingPassword event handler"
    OnContinueButtonClick="ContinueButtonClick 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"
    PasswordHintText="string"
    PasswordLabelText="string"
    PasswordRecoveryIconUrl="uri"
    PasswordRecoveryText="string"
    PasswordRecoveryUrl="uri"
    PasswordRequiredErrorMessage="string"
    runat="server"
    SkinID="string"
    Style="string"
    SuccessPageUrl="uri"
    SuccessText="string"
    SuccessTitleText="string"
    TabIndex="integer"
    ToolTip="string"
    UserName="string"
    UserNameLabelText="string"
    UserNameRequiredErrorMessage="string"
    Visible="True|False"
    Width="size"
>
        <CancelButtonStyle/>
        <ChangePasswordButtonStyle/>
        <ChangePasswordTemplate>
            <!-- child controls -->
        </ChangePasswordTemplate>
        <ContinueButtonStyle/>
        <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>
        <PasswordHintStyle/>
        <SuccessTemplate>
            <!-- child controls -->
        </SuccessTemplate>
        <SuccessTextStyle/>
        <TextBoxStyle/>
        <TitleTextStyle/>
        <ValidatorTextStyle/>
</asp:ChangePassword>

The following code example shows how to set the property to define a regular expression that checks passwords to ensure that they meet the following criteria:

  • Are greater than six characters.

  • Contain at least one digit.

  • Contain at least one special (non-alphanumeric) character.

The password requirements contained in the property are displayed to the user.

If the password entered by the user does not meet the requirements of the property, the text contained in the property is displayed to the user. If a new password is not entered, the text contained in the property is displayed to the user.

System_CAPS_noteNote

The new password must meet the minimum requirements set by the in the , , and properties. If the password does not meet these requirements, the ChangePasswordError event is raised.

<%@ page language="C#"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
  <title>Change Password with Validation</title>
</head>
<body>
  <form id="form1" runat="server">
  <div>
  <asp:changepassword id="ChangePassword1" runat="server"
  PasswordHintText = 
    "Please enter a password at least 7 characters long, 
    containing a number and one special character."
  NewPasswordRegularExpression =
    '@\"(?=.{7,})(?=(.*\d){1,})(?=(.*\W){1,})' 
  NewPasswordRegularExpressionErrorMessage =
    "Error: Your password must be at least 7 characters long, 
    and contain at least one number and one special character." >
  </asp:changepassword>
  </div>
  </form>
</body>
</html>
<%@ page language="VB"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
  <title>Change Password with Validation</title>
</head>
<body>
  <form id="form1" runat="server">
  <div>
  <asp:changepassword id="ChangePassword1" runat="server"
  PasswordHintText = "Please enter a password at least 7 characters long, containing a number and one special character."
  NewPasswordRegularExpression = '@\"(?=.{7,})(?=(.*\d){1,})(?=(.*\W){1,})' 
  NewPasswordRegularExpressionErrorMessage = "Your password must be at least 7 characters long, and contain at least one number and one special character.">
  </asp:changepassword>
  </div>
  </form>
</body>
</html>
.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top