Creating the Sign up page
How to create the registration sign-up page
Creating the sign up page is an easy process in ASP.NET 2.0. Just like the Login control, there is a CreateUserWizard control for user registration. All we need to do is to place this control on the Registration.aspx page and set a few properties of the control. Let us do it:
1. Open the Registration.aspx page and switch to the design view.
2. Delete any existing content in the Content box.
3. Insert a table with three rows and three columns. Type some message in the middle cell of the first row.
4. Drag the CreateUserWizard control from the toolbox (Login section) and drop it inside the middle cell of the second row. As soon as we drop the control, its smart tag menu will open up. Select the Auto format option to give a style to the control:
Keeping the control selected, open the properties window. Look for a property named ContinueDestinationPageUrl. Click on the button in the cell next to the property name. A list of all the files in our site is displayed. Select the Default.aspx page. By doing so, we have specified that if the registration is successful, the user will be directed to the home page after signing up.
That is all we need to do for user registration. We can now run our site and test it. When the user visits the site for the first time, a message - `You are not logged in' - is displayed. If the user tries to browse the download page in this condition, she will be taken to the login page.
If the user is not registered, she cannot login. Invalid user names and passwords will fail.
We can test the registration process too.
Once registration is successful, the user can begin to access the download page.
In this chapter, we have learned the important concept of security. We now have a site with features like user registration, user login and restricted access. All of these is done without writing any code at all. This is the power of ASP.NET 2.0!
In the next lesson, we will learn how to deploy our site so that the outside world can view it.






