Student Learning Outcomes:
1. Use asp.net controls to retrive specifice records from a
database.
Important Points:
1. Open a new page and save it as demographicselect.aspx.
When you save an aspx or asp page it must be in the root folder of the web
site.
2. Go to the toolbox, go to asp.net controls, click on the + next to the data folder, then drag the grid view to your page: You will see:

3. Click the down arrow in the choose data source box and select new data source you will see:

4. Click on Access Database: you will see:

5. Ether type in the path which would be fpdb/demographic.mdb or click browse and go to the database and select it. Then click next and you will see: Note: the fields will be different in this example than in demographic.

6. In this case we only have one table, but if you had other tables you would click on the drop down arrow and select them or select a query from the database which is called a view.
7. Click the * box to select all of the fields, click where next. You will
see:

8. In this case we will select records based on the lastname field =
wylie or one of the last names you have put into your access database.
a. In column, click the drop down arrow and select Lastname
field
b. In operator field, click the drop down arrow and select =
c. In source, click the drop down arrow and select form
d. In form field, type in Lastname
e. Click Add.

9. You will see:

10. click Ok, You will see:

11. Click Next, You will see:

12. Click test query. You will see:

13. Click ok, you will see:

14. Click finish. You will see:

15. Click on auto format you will see:

16. Select a format and click Ok. You will see:

17. Save the file and press F12. to display the page.
Best Practices: