Working with the Change Password Web Part
The Change Password Web Part lets shoppers that are already logged in change their passwords.
The Change Password Web Part asks the shopper to enter an existing password and then a new password. The shopper enters the new password twice so that it can be compared to make sure that the shopper has not mistyped it. All passwords are displayed with obfuscating characters for additional security.
There are two components to the Change Password Web Part:
The Change Password Web Part validates the shopper's input on the client computer to prevent a round trip to the server if the passwords do not match or are not secure enough. The developer configuring the site can assign a password pattern (as a regular expression) that is enforced by both client-side and server-side validation. In addition to this pattern, a site designer can enter a string that describes the required password pattern to the shopper.
ChangePassword.ascx file displays an ASP.NET ChangePassword control to the shopper. The control authenticates the shopper against the Commerce Server 9.0 Profiles System.
Properties
There following table lists and describes the properties for the Change Password Web Part.
Property |
Maps To |
Type |
Description |
Default |
---|---|---|---|---|
On cancel, go to URL |
CancelDestinationPageUrl |
String |
Sets the page URL to redirect to when the user presses the "cancel" button. |
Blank |
"Cancel" button text |
CancelPushButtonLabel |
String |
Sets the text displayed on the "cancel" button. |
Cancel |
"Password change failed" message |
ChangePasswordFailureText |
String |
Sets the text displayed when the password change fails. |
Incorrect password, please enter your current password. |
"Submit" button label |
ChangePasswordPushButtonLabel |
String |
Sets the text displayed on the "submit" button. |
Submit |
"Change Password" title text |
ChangePasswordTitle |
String |
Sets the title text displayed above the change password section. |
Change Password |
"Confirm new password" label text |
ConfirmNewPasswordLabel |
String |
Sets the text displayed beside the "confirm new password" text box. |
* Confirm new password |
"Confirm new password is required" message |
ConfirmNewPasswordRequired |
String |
Sets the text displayed when the user submits the form without supplying a value for "confirm new password". |
Please re-enter the password for confirmation |
On completion, go to URL |
ContinueDestinationPageUrl |
String |
Sets the page URL to redirect to once the operation has completed. |
Blank |
"Continue" button text |
ContinuePushButtonLabel |
String |
Sets the text displayed on the "continue" button. |
View My Account |
"Current password" label text |
CurrentPasswordLabel |
String |
Sets the text displayed beside the "current password" text box. |
* Current password |
"Current password is required" message |
CurrentPasswordRequiredErrorMessage |
String |
Sets the text displayed when the user submits the form without supplying a value for "current password". |
Please enter your password |
Display "user name" |
DisplayUserName |
Boolean |
If checked, causes the web part to show the user name of the account whose password is being reset. |
False |
Instructional text |
InstructionText |
String |
Sets the text block displayed below the title. Can be used to provide verbose instructions to end users. |
Enter your old and new passwords to change the login credentials for your account. |
"Passwords don't match" message |
NewPasswordCompareErrorMessage |
String |
Sets the text displayed when the user inputs a password confirmation that doesn't match their "new password". |
The two passwords do not match. |
"New password" label text |
NewPasswordLabel |
String |
Sets the text displayed beside the "new password" text box. |
* New password |
"New password is required" message |
NewPasswordRequiredErrorMessage |
String |
Sets the text displayed when a user submits the form without supplying a value for "new password". |
You must enter a new password |
"Password creation tip" link text |
PasswordCreationTipLink |
String |
Sets the text displayed as the "password creation tip" hyperlink. |
Password creation tips |
"Password creation tip" text |
PasswordCreationTipText |
String |
Sets the text displayed to help the user create an acceptable password. |
Your password must be at least 6 characters long, and contain at least one one lower case letter, one upper case letter and one digit |
"Validation summary" header text |
PasswordValidatorErrorMessage |
String |
Sets the text displayed above the collection of errors, which is displayed when the user makes one or more input mistakes. |
Your password must be at least 6 characters long, and contain at least one lower case letter, one upper case letter and one digit |
"Password change is required" text |
RequiredPasswordChangeText |
String |
Sets the text displayed at the top of the web part to alert the user that a password change is required to continue. |
You are taken to this page because you are required to change your password. |
"Success" text |
SuccessText |
String |
Sets the text displayed once the password change has completed successfully. |
Your password has been successfully changed. |
"User name" label text |
UserNameLabel |
String |
Sets the text displayed beside the "user name" text box. |
E-mail address |
"Security question" label |
NA |
String |
Sets the text displayed beside the "security question" text box. |
* Security question |
"Security answer" label |
NA |
String |
Sets the text displayed beside the "security answer" text box. |
* Security answer |
* Security question help link |
NA |
String |
Sets the page URL to redirect to if the Security Question Help link is clicked. |
Security question help |
Security question help text |
NA |
String |
Sets the text displayed beside the "security question help" text box. |
A question only you know the answer to. |
Error message for required security question |
NA |
String |
Sets the error message text displayed beside the "security question" text box. |
Please enter a security question |
Error message for security answer |
NA |
String |
Sets the error message text displayed beside the "security answer" text box. |
Please enter a security answer |
Continue Shopping Button label |
NA |
String |
Sets the text displayed in the Continue Shopping Button |
Continue Shopping |
Continue Shopping Url |
NA |
String |
Sets the page URL to redirect to if the Continue Shopping Button is clicked. |
/Pages/default.aspx |
Customization
The Change Password Web Part is customizable through the ASCX file. Password strength is configured by using a regular expression.
Important Note: |
---|
If you make modifications to the ASCX file to customize a Web Part, rename the modified ASCX file to avoid the risk of overwriting your Web Part customizations during an upgrade. |
See Also
Other Resources
Developing with SharePoint Commerce Services