ADO Database ASP.Net

<%@ Page Language="C#" %>


    Using the DataReader mode for executing a SQL Statement


    
    

                                   runat="server"
                           ProviderName="System.Data.SqlClient" 
                           DataSourceMode="DataReader"
                           ConnectionString="<%$ ConnectionStrings:AdventureWorks %>"
                           SelectCommand="Select ProductSubcategoryID, Name from Production.ProductSubcategory">            
        
        Categories: 
                                  DataSourceID="categoriesSource"
                          DataValueField="ProductSubcategoryID" 
                          DataTextField="Name" 
                          AutoPostBack="true"
                          ID="lstCategories" />
                                   runat="server"
                           ProviderName="System.Data.SqlClient" 
                           DataSourceMode="DataReader"
                           ConnectionString="<%$ ConnectionStrings:AdventureWorks %>"
                           SelectCommand="Select ProductID, Name, ProductNumber, StandardCost from Production.Product Where ProductSubcategoryID=@ProductSubcategoryID">
            
                                     ControlID="lstCategories" 
                     Name="ProductSubcategoryID"
                     PropertyName="SelectedValue" />
            

        
                    HeaderStyle-HorizontalAlign="Center" HeaderStyle-Font-Bold="True"
            HeaderStyle-BackColor="blue" HeaderStyle-ForeColor="White" />        
    

    


File: Web.config

  
  
                     connectionString="Data Source=localhost\SQLEXPRESS;Initial Catalog=AdventureWorks;Integrated Security=True"
             providerName="System.Data.SqlClient" />