17.4. Implementing Registration and Login
The usual flow of a restricted site is that a user signs up for access by creating a user ID and password. After creating an account, the user can log in and poke around. In this section, you create the sign up (registration), login, and retrieve password pages.
17.4.1. Creating the Registration page with CreateUserWizard
Users create an account by navigating to a sign-up page. This step assumes that you've already created the Membership database in the preceding section. Follow these steps to create a registration page for the Small Business Starter Kit site:
Making sure to select a master page, add an ASP.NET page named Register.aspx to the starter kit project.
From the Login area of the Toolbox, drag a CreateUserWizard control and drop it inside ContentPlaceHolder1, as shown in Figure 17-5.
Browse to Register.aspx and fill in the form to create a user.
You can use the information in the following table if you want reminders of the details in later sections of the chapter.
Field Value User Name John Prince Password abc123# Confirm Password abc123# firstname.lastname@example.org Security Question What breed is Goldie? Security Answer GoldenDoodle
Click Create User.
The form confirms your registration. If you didn't create the database, you get an error message. See the previous section, "Creating the Membership Database."
When complete, the form looks like Figure 17-6.