Home   |   QuickStart Welcome   |   ASP.NET   |   Web Services   |   How Do I...?   
  |   I want my samples in...      

ASP.NET 2.0 Quickstart Tutorials

CreateUserWizard

The CreateUserWizard control extends the Wizard control with additional functionality that relies on the Membership service to create a new user in your membership data store. Since it extends the Wizard control you can customize the CreateUserWizard experience on your website by adding additional WizardSteps that collect additional information or by templating the CreateUseWizardStep.
  • CreateUserWizardStep: Pre-defined wizard step with the create user display and logic added.
  • CompleteWizardStep: Pre-defined wizard step that shows the successful completion of the wizard.
  • Collection of WizardSteps: Each WizardStep contains a discrete piece of content to be displayed to the user. Only one WizardStep will be displayed at a time.
  • Navigation Buttons: The navigation area below each WizardStep that contains the navigation buttons to go the next and pervious steps in the CreateUserWizard.
  • SideBar: An optional element that contains a list of all WizardSteps and provides a means to skip around the WizardSteps in a random order.
  • Header: An optional element to provide consistent information at the top of the WizardStep.
Note: If you are using the CreateUserWizard control in a visual designer you can switch to view different WizardSteps on the design surface. To improve the development experience, when you run the page whatever WizardStep was displayed in the designer will be the step you start on in a browser. This makes it easier to debug new steps you might be adding to a complicated CreateUserWizard where each WizardStep requires a lot of validated input. However, you MUST REMEMBER to change the WizardStep back to the first step in the designer when you are done making changes.

Simple Single-Step CreateUserWizard Control Sample

This sample demonstrates basic CreateUserWizard functionality. This sample uses a regular expression to validate the email address.
VB CreateUserWizard
Run Sample View Source

CreateUserWizard Behaviors

There are a variety of ways to customize the CreateUserWizard control to meet your needs. In addition to the visual elements displayed to the user on the web site, the CreateUserWizard control also contains a MailDefintion that determines the content of the email that is sent to the user. The CreateUserWizard control does not contains a default email message but you can add your own text or html file to be used as the body of the message. If you are creating your own email file the control will automatically insert the user�s username and password for the following strings: < %UserName%> <%Password%> in the designated email file. Security Note: It may be possible for the email containing the user�s password to be intercepted by hackers and thus compromise the user�s account. Some additional customization are:
  • Additional Wizard Steps: Collect additional information about the user.
  • DisableCreatedUser: By default the users are creating in the membership system after the CreateUserWizard step of the wizard is completed. You can use this flag in the following scenarios to ensure that the entire wizard is completed prior to activation, or to enable users to register pending an administrators approval.
  • Links: Displaying icons and links to other information and tasks.

ChangePassword Behaviors Sample

This sample demonstrates how to add an additional WizardStep to the CreateUserWizard.

VB CreateUserWizard Behaviors
Run Sample View Source

CreateUserWizard Styles

The CreateUserWizard control allows you to control the look and feel by setting a variety of style properties on the control. In addition to the standard Wizard style properties, the CreateUserWizard control supports the following styles:
  • Label Style: Applies to the labels associated with textboxes on the CreateUserWizard.
  • TextboxStyle: Applies to the textboxes.
  • CompleteSuccessTextStyle: Applies to the text on the complete step.
  • InstructionTextStyle: Applies to the instruction text.
  • PasswordHintStyle: Applies to the password hint text.
  • HyperlinkStyle: Applies to all of the links link.
  • ErrorMessageStyle: Applies to the text returned if the membership system fails to create the user.
  • ValidatorTextStyle: Applies to the text displayed if the required field valuators fail.

CreateUserWizard Style Sample

This sample demonstrates various CreateUserWizard styles.
VB CreateUserWizard Styles
Run Sample View Source

CreateUserWizard Templates

The CreateUserWizard control allows you more complete control of the look and feel of the control through templating. The CreateUserWizard control supports individual components of the CreateUserWizard to be templated separately. You may choose to template 1 or more of these templates for a given CreateUserWizard control in your web application. In addition to the standard templates supported by the Wizard control, the CreateUserWizard also supports templating the CreateUserStep. The CreateUserWizard control supports the following templates:
  • HeaderTemplate
  • SideBarTemplate
  • StartNavigationTemplate
  • StepNavigationTemplate
  • FinishNavigationTemplate< li>
  • ContentTemplates
  • (used for the CreateUserStep and the CompleteStep).
To ensure that the functionality of the CreateUser and Complete steps function appropriately use the following control IDs or command names:
  • ID=UserName
  • ID=Password
  • ID=Email
  • ID=ConfirmPassword
  • ID=Question< li>
  • ID=Answer
  • ID=ErrorMessage
  • Command=CreateUser
  • (the control must support command bubbling)
  • Command=Cancel
  • (the control must support command bubbling)

CreateUserWizard Templates Sample

This sample demonstrates how to access controls inside the templated CreateUser Step as well as controls inside additional Wizard steps. No graphical elements have been added to the template in an attempt to simplify the sample. This sample contains the well known control IDs and command names required for a templated CreateUser Step.

VB CreateUserWizard Templates
Run Sample View Source