Let's review what we did: you built the connection string and finished making the connection inside the using (SqlConnection conn... line so that the connection could be properly disposed of. Then, you wrote the query string, made the command object, opened a connection, and executed the reader. Finally, you used DataBind to bind the database table to the charts so that you could display the results.
The complete version of the Default.aspx.cs file for this chapter, including comments, is shown in the following code block:
//using is a directive
//System is a name space
//name space is a collection of features that our needs to run
using System;
using System.Data.SqlClient;
//public means accessible anywhere
//partial means this class is split over multiple files
//class is a keyword and think of it as the outermost level of grouping
//:System.Web.UI.Page means our...