Ice01Data Exploration 1

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
  • Gain confidence debugging ASP.NET pages
  • Familiarize yourself with the ASP.NET SDK Documentation (Microsoft)
  • Explore using data sources and data controls in web pages

ICE ICE 04 INSTRUCTIONS

SETUP EXERCISE ENVIRONMENT

  1. Download and save the asp and various data files locally.
  2. Extract the ZIP file and rename the .aspx.txt files to just use .aspx extension
  3. Create a new empty Visual Studio Web Application project
  4. Create an App_Data folder in the project
  5. 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
  6. Use the ServerExplorer to review the tables in the grocertogo.mdb database including the Product table


ICE ICE 04 Part 1: Explore the Controls in datacontrols.aspc

  1. Run the ASP.NET page
  2. Experiment with modifying the scripts, the SQL statements and the GridView control
  3. Explore (or Google) the API information about the DataSet and GridView classes

ICE ICE 04 Part 2: Experiment with Declarative Programming by Setting Data Control Properties like "Datasource"

  1. Create a new web page called "datacontrol1.aspx"
  2. Add a GridView object to the page.
  3. From the Design view, choose a new datasource for the GridView
  4. Call the new SQL Datasource "GrocerCustomers", and link it to the .mdb file in the App_Data folder
  5. Choose to display the FirstName, LastName and City from the Customers table (order by City)
  6. 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 ICE 04 Part 3: Using XML as a Datasource

  1. Open the datacontrol2.aspx page and review its code. Try to determine what it will display when run.
  2. Run the aspx page and compare your prediction to the actual page.

When you get done with the above exercises, show your Instructor.