ADO Database ASP.Net






    Untitled Page


    
    

                              runat="server" 
                      DataSourceId="SqlDataSource1" 
                      AllowPaging="True"
                      BorderColor="#DEBA84" 
                      BorderStyle="None" 
                      BorderWidth="1px" 
                      BackColor="#DEBA84" 
                      CellSpacing="2" 
                      CellPadding="3" 
                      DataKeyNames="CustomerID" 
                      AutoGenerateSelectButton="True" 
                      AutoGenerateColumns="False" 
                      PageSize="5">
                                       BackColor="#F7DFB5">
                                      HorizontalAlign="Center">
                                       BackColor="#A55129" 
                          Font-Bold="True">
             
                                                  HeaderText="CustomerID"
                                 DataField="CustomerID" 
                                 SortExpression="CustomerID">
                 
                                                  DataField="CompanyName" 
                                 SortExpression="CompanyName">
                 
                                       DataField="ContactName" SortExpression="ContactName">
                 
                                       DataField="ContactTitle" SortExpression="ContactTitle">
                 
                                       SortExpression="Address">
                                       SortExpression="City">
                                       SortExpression="Region">
                                       SortExpression="PostalCode">
                                       SortExpression="Country">
                                       SortExpression="Phone">
                                       SortExpression="Fax">
            

                                          BackColor="#738A9C" 
                              Font-Bold="True">
            
        
        

Customer Details:


                                 runat="server" 
                         DataSourceId="SqlDataSource2"
                         BorderColor="#DEBA84" 
                         BorderStyle="None" 
                         BorderWidth="1px"
                         BackColor="#DEBA84" 
                         CellSpacing="2" 
                         CellPadding="3" 
                         AutoGenerateRows="False" 
                         DataKeyNames="CustomerID">
             
             
             
             
                                      DataField="CustomerID" SortExpression="CustomerID">
                
                                     SortExpression="CompanyName">
                                     SortExpression="ContactName">
                                     SortExpression="ContactTitle">
                                     SortExpression="Address">
                                     SortExpression="City">
                                     SortExpression="Region">
                                     SortExpression="PostalCode">
                                     SortExpression="Country">
                                     SortExpression="Phone">
                                     SortExpression="Fax">
            

                            Font-Bold="True">
                            Font-Bold="True">
        
                     SelectCommand="SELECT * FROM [Customers]" 
             ConnectionString="<%$ ConnectionStrings:AppConnectionString1 %>" />
                     SelectCommand="SELECT * FROM [Customers]"
             FilterExpression="CustomerID='{0}'" 
             ConnectionString="<%$ ConnectionStrings:AppConnectionString1 %>">
             
                                       PropertyName="SelectedValue">
             

        
    
    

    


File: Web.config

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