Note: Please keep the programs that you create today, in case you have a question about your grades for the ICEs at the end of the quarter. When you're working with a partner, each person should save his-or-her own copy.
Objectives | Resources |
|
|
ICE 04 INSTRUCTIONS
SETUP EXERCISE ENVIRONMENT
- Download and save the asp and various data files locally.
- Extract the ZIP file and rename the .aspx.txt files to just use .aspx extension
- Create a new empty Visual Studio Web Application project
- Create an App_Data folder in the project
- Right-click on the project and use the "Add Existing Item" menu option to add all of the files to the project, making sure to place the data files (.xml and .mdb) in the App_Data folder
- Use the ServerExplorer to review the tables in the grocertogo.mdb database including the Product table
ICE 04 Part 1: Explore the Controls in datacontrols.aspc
- Run the ASP.NET page
- Experiment with modifying the scripts, the SQL statements and the GridView control
- Explore (or Google) the API information about the DataSet and GridView classes
ICE 04 Part 2: Experiment with Declarative Programming by Setting Data Control Properties like "Datasource"
- Create a new web page called "datacontrol1.aspx"
- Add a GridView object to the page.
- From the Design view, choose a new datasource for the GridView
- Call the new SQL Datasource "GrocerCustomers", and link it to the .mdb file in the App_Data folder
- Choose to display the FirstName, LastName and City from the Customers table (order by City)
- Run the ASP.NET page, compare the code and the result to the first datacontrol.aspx page. Be prepared to discuss the differences in class with your Instructor.
ICE 04 Part 3: Using XML as a Datasource
- Open the datacontrol2.aspx page and review its code. Try to determine what it will display when run.
- Run the aspx page and compare your prediction to the actual page.
When you get done with the above exercises, show your Instructor.