Using  an asp.net control to retrieve data from the demographic.mdb



 

Student Learning Outcomes:

1. Create a aspx page to retrieve data from the demographic database.

Important Points:

1. Open a new page and save it as demographic.aspx.  Make sure you save it in the root folder of your 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:

Grid view

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

data source



 

4. Click on Access Database: you will see:

choose source for data

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:

database field selection

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.
7. Click the * box to select all of the fields and click next.  You will see

select fields

8. Click test query.  You will see:

display records

9. Click finish.  You will see:

grid view of data in driver.mdb

10. Click on auto format you will see:

auto format choices

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

grid view with brown sugar auto format

12. Save the file and press F12. to display the page.



Best Practices: