0% found this document useful (0 votes)
51 views2 pages

Lab 7: Registration

The document discusses creating a registration page and database table for user registration. It includes steps to create a database called 'myDB' and a table called 'Users' with various user attributes. It then provides instructions to add controls to a registration form, populate a dropdown list with countries, configure a SqlDataSource to connect to the database, and write code for the registration button click event.

Uploaded by

james smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views2 pages

Lab 7: Registration

The document discusses creating a registration page and database table for user registration. It includes steps to create a database called 'myDB' and a table called 'Users' with various user attributes. It then provides instructions to add controls to a registration form, populate a dropdown list with countries, configure a SqlDataSource to connect to the database, and write code for the registration button click event.

Uploaded by

james smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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

You might also like