Republished With Permission - Original Article
I’ve seen a few questions in the forums lately looking for
examples on how to use the CreateUserWizard control to create new users in the
ASP.NET 2.0 membership system, and then as part of the registration process
assign the new user into custom roles and/or collect and store custom profile
properties about them (country, address, gender, zipcode, etc).
Stefan from my team had a cool CreateUserWizard control
sample that I borrowed and expanded upon to build-up a sample that demonstrates
how to build a fairly common user management, roles and personalization system
in ASP.NET 2.0 that does this. I was pleasantly surprised to find it only took
about 25 lines of C# code in the entire app. J
The sample comes with 6 pages:
Figure 1

Specifically it supports:
1) Login support to enable registered users to login to the
web app using forms auth and the new membership system (login.aspx)
2) Registration support to enable visitors to create and
register new users in the membership system (CreateNewWizard.aspx)
3) Profile support that enables the site to gather
information about the user on registration, and for the users to see that
information on a profile page (MyProfile.aspx).
4) Change Password support to enable registered users to
change their password in the membership system (ChangePassword.aspx)
5) Password Recovery support to enable users to reset their
password if they forgot them (RecoverPassword.aspx)
You can download and run the sample yourself from here. Note
that it is built with the final release of VS 2005 and ASP.NET 2.0 – so it
won’t work with Beta2 (although it will probably work with the RC).