Working with the Registration Web Part
The Registration Web Part lets shoppers create a profile to use on your e-commerce site. This Web Part gathers the appropriate personal information necessary to create an account and set up the site login information, and lets shoppers set passwords for their accounts.
You can configure the Registration Web Part to use a shopper's e-mail address as the unique identifier, or you can configure it to let the shopper specify a unique user name. At a minimum, the Registration Web Part collects the first and last name of the shopper. You can configure this Web Part to gather additional information if needed.
You can configure the Registration Web Part to employ a challenge-response system if the shopper forgets the password, or you can employ a password recovery process. For the challenge-response system, shoppers specify a question and an answer during creation of their accounts. If the shopper forgets the password and the shopper correctly answers the challenge question, the system grants access to the Web site.
Architecture
The Registration Web Part contains the following components:
RegistrationWizardWebPart. Dynamically loads the RegistrationWizard user control.
RegistrationWizard.ascx. Lets an unregistered shopper create a profile for the shopping site. The control uses the membership provider to create a new profile by using the API UserProfile service. The RegistrationWizard.ascx file contains a CreateUserWizard Web control.
Properties
The following table lists and describes the properties for the Registration Web Part.
Property |
Maps to |
Type |
Description |
Default |
---|---|---|---|---|
Answer Label Text |
AnswerLabelText |
String |
Text to be displayed next to the Security Question field representing the answer to the Security Question. |
Security Answer |
Answer Required Error Message |
AnswerRequiredErrorMessage |
String |
If the shopper does not provide an answer to the security question, this text is displayed. |
Please enter a security answer. |
Complete Label Text |
CancelButtonText |
String |
Text displayed when the Registration Web Part information has been properly processed with no errors. |
Your account has been successfully created. |
Confirm Password Error Message |
CommunicationText |
String |
Text message displayed when the two password fields the shopper entered do not match. |
The Password and Confirmation Password must match. |
Confirm Password Label Text |
CompleteLabelText |
String |
Text displayed next to the second password field. |
Confirm password: |
Confirm Password Required Error Message |
ConfirmEmailErrorMessage |
String |
Text displayed if a password has not been entered. |
Please re-enter the password for confirmation. |
Confirm Password Required Tooltip |
ConfirmPasswordErrorMessage |
String |
Text displayed in the password field tooltip. |
Please re-enter the password for confirmation. |
Continue Button Text |
ConfirmPasswordLabelText |
String |
Text displayed on the Continue action button. |
Continue |
Create Button Text |
ConfirmPasswordRequiredErrorMessage |
String |
Text displayed on the Create Button action button. |
Create Account |
First Name Label Text |
ContinueButtonText |
String |
Text displayed next to the First Name field. |
First name: |
First Name Required Error Message |
ContinueDestinationPageUrl |
String |
Text message displayed if the shopper does not specify a first name. |
Please enter your first name. |
Header Label Text |
CreateButtonText |
String |
Text displays as the Web Part label. |
Sign Up for Your New Account |
Last Name Label Text |
DuplicateUserNameErrorMessage |
String |
Text displayed next to the Last Name field. |
Last name |
Last Name Required Error Message |
EmailLabelText |
String |
Text message displayed if the shopper does not specify a last name. |
Please enter your last name. |
Password Label Text |
EmailRequiredErrorMessage |
String |
Text displayed next to the password field. |
Password |
Password Required Error Message |
EmailValidationExpression |
String |
Text displayed if the shopper does not provide a password. |
Please enter a password |
Password Regular Expression |
EmailValidatorErrorMessage |
String |
Sets the allowed characters in a password; any valid regular expression can be used in this field, while the default allows any combination of letters and numbers only. |
[0-9a-zA-Z]* |
Question Label Text |
FirstNameLabelText |
String |
Text displayed next to the Security question field. |
Security question: |
Question Required Error Message |
FirstNameRequiredErrorMessage |
String |
Text displayed when the shopper does not provide a Security question. |
Please enter a security question. |
User Name Label Text |
HeaderLabelText |
String |
Text displayed next to the user name field. |
Logon name: |
User Name Required Error Message |
InstructionText |
String |
Text displayed if the shopper does not enter a name. |
Please enter your Logon name. |
User Name Validator Error Message |
LastNameLabelText |
String |
Text displayed if the shopper name entered does not meet the pattern (such as length, valid characters, and so on); this message can be the same as the User Name required Error Message if you do not want to give clues as to valid user name requirements. |
User Name does not meet required pattern. |
User Name Validation Expression |
LastNameRequiredErrorMessage |
String |
A valid regular expression that sets the parameters for valid user names; the expression can set limits on username length, valid characters, and other parameters such as use of mixed case, numbers, and so on. |
\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* |
Registration Wizard Main Duplicate User Name Error Message |
PasswordCreationTipLink |
String |
The message displayed if the shopper name has already been registered with the system. |
The e-mail address is already in use. Please enter a different e-mail address. |
Password Strength Not Met Error Message |
PasswordCreationTipText |
String |
The message displayed if the password selected by the shopper does not meet the regular expression requirements. |
Password strength not met. A valid password must have a minimum of 6 characters, with at least one of each of the following: upper case character, lower case character and number. |
Cancel Button Text |
PasswordLabelText |
String |
Text displayed on the Cancel action button. |
Cancel |
Email Label Text |
PasswordRegularExpression |
String |
Text displayed next to the email address field. |
E-mail Address: |
Email Required Error Message |
PasswordRequiredErrorMessage |
String |
Text displayed if the shopper does not provide an e-mail address. |
Please enter your e-mail address |
Email Validator Error Message |
PasswordStrengthNotMetErrorMessage |
String |
Text displayed if the e-mail address entered does not meet standard email formats as set by the Email Validator Expression. |
Please enter a valid e-mail address |
Email Validator Expression |
PersonalInformationLabelText |
String |
The regular expression that defines valid e-mail addresses. |
w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* |
Post action page URL |
PostActionPageUrl |
String |
The URL to link to after this Web Part has been filled. |
"" |
You can configure the Registration Web Part to let the shopper enter a personal question and answer to facilitate a Challenge-Response question and answer password recovery system. The default value of the Enable Challenge Response property is False. Shoppers can specify their own personal question and answer, which is stored with their profiles.
The following table lists the field and maximum length limits imposed in the Registration Web Part.
Field |
Maximum length |
---|---|
User Name/Email Address |
64 |
Password/Confirm Password |
50 |
First Name |
50 |
Last Name |
50 |
Security Question |
255 |
Security Answer |
50 |
The following table lists the default regular expressions that the fields in the Registration Web Part use.
Field |
Pattern |
Regular expression |
---|---|---|
Username/Email Address |
E-mail address |
\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* |
Password/Confirm Password |
Alphanumeric characters |
[0-9a-zA-Z]* |
Customization
You can customize the Registration Web Part by modifying the .ascx file or the properties sheet.
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. |
Error Handling
There is no design-time error handing required for this Web Part.
API Dependencies
The Registration Web Part relies on the API and a membership provider that encapsulates calls to the API service. Because the Registration Web Part implements a CreateUserWizard Web control, a membership provider can support its functionality.