ADO Net Database ASP.Net Tutorial

<%@ Page Language="C#" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>

    DataSet myDataSet = new DataSet();
    void BuildDataSetTable(string commandText, string tableName)
    {
       string ConnectionString = Convert.ToString(ConfigurationSettings.AppSettings["MSDEConnectString"]);
       SqlConnection myConnection = new SqlConnection(ConnectionString);
       SqlCommand myCommand = new SqlCommand(commandText, myConnection);
       SqlDataAdapter myAdapter = new SqlDataAdapter(myCommand);
       try {
          myConnection.Open();
          myAdapter.Fill(myDataSet, tableName);
       } catch (Exception ex) {
          throw(ex);
       } finally {
          myConnection.Close();
       }
    }
    void Page_Load(object sender, EventArgs e) {
       if (!(Page.IsPostBack)) 
       {
          string SelectPublisher = "SELECT PublisherID, PublisherName From Publisher";
          BuildDataSetTable(SelectPublisher, "Publisher");
          Label1.Text = "Select a Publisher";
          DropDownList1.DataBind();
          RadioButtonList1.DataBind();
          ListBox1.DataBind();
       }
    }
    void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) {
          string SelectBook = "SELECT * FROM Book WHERE BookPublisherID=" + RadioButtonList1.SelectedItem.Value;
          BuildDataSetTable(SelectBook, "Book");
          DataGrid1.DataBind();
    }
    void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) {
          string SelectBook = "SELECT * FROM Book WHERE BookPublisherID=" + DropDownList1.SelectedItem.Value;
          BuildDataSetTable(SelectBook, "Book");
          DataGrid1.DataBind();
    }
    void ListBox1_SelectedIndexChanged(object sender, EventArgs e) {
          string SelectBook = "SELECT * FROM Book WHERE BookPublisherID=" + ListBox1.SelectedItem.Value;
          BuildDataSetTable(SelectBook, "Book");
          DataGrid1.DataBind();
    }





    
    
        ' DataTextField="PublisherName" DataValueField="PublisherID" AutoPostBack="True" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
    
    

A DropDownList
    


    
        ' DataTextField="PublisherName" DataValueField="PublisherID" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
    
    

A ListBox
    


    
        ' DataTextField="PublisherName" DataValueField="PublisherID" AutoPostBack="True" OnSelectedIndexChanged="ListBox1_SelectedIndexChanged">
    
        
    
        ' BorderStyle="None" BorderWidth="1px" BorderColor="#CC9966" BackColor="White" CellPadding="4">
            
            
            
            
            
        
    
    


File: Web.config