CT050-3-2 WAPP Registration
Lab 7 : Registration
Create database
1. Create a database “myDB”.
2. Create table “Users” which contains following attributes :
a. ID primary key
b. Username
c. Password
d. Email
e. Country
3. Insert records into the table and save it.
Create Register.aspx page
1. Add a new form “Register.aspx and add the controls as following :
txtUsername
txtPassword
txtEmail
ddlCountry
2. Select ddlCountry, click Edit Items in the Smart Tag menu. Click Add and enter the
countries in the component of Text and Value as follow:
Level 2 Asia Pacific University of Technology & Innovation Page 1 of 2
CT050-3-2 WAPP Registration
3. Open the Data section of the toolbox and drag a SqlDataSource control over to the
page.
4. Click Configure Data Source in the Smart Tag menu. In the Configure Data Source
Wizard, choose the database “myDB”. Click next and name the connection string as
“myConnectionString”.
5. Click Next in the Configure Data Source Wizard. The page that opens allows you to
choose the table.
6. Select the “Users” table and click the * in the Columns.
7. Click Next to test out the query. You will see a table that shows the rows from the
table.
8. Double click the Register button and enter the following statements.
9. Open this page in the Web browser and test it.
Level 2 Asia Pacific University of Technology & Innovation Page 2 of 2