Data Binding ASP.Net Tutorial

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



    Untitled Page


    
         
        

                                      runat="server" 
                          AutoGenerateColumns="False" 
                          DataKeyNames="ProductID"
                          DataSourceID="SqlDataSource1" 
                          EmptyDataText="There are no data records to display.">
                
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                

            
                                           runat="server" 
                               ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
                DeleteCommand="DELETE FROM [Products] WHERE [ProductID] = @ProductID" InsertCommand="INSERT INTO [Products] ([ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued]) VALUES (@ProductName, @SupplierID, @CategoryID, @QuantityPerUnit, @UnitPrice, @UnitsInStock, @UnitsOnOrder, @ReorderLevel, @Discontinued)"
                ProviderName="<%$ ConnectionStrings:NorthwindConnectionString.ProviderName %>"
                SelectCommand="SELECT [ProductID], [ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued] FROM [Products]"
                UpdateCommand="UPDATE [Products] SET [ProductName] = @ProductName, [SupplierID] = @SupplierID, [CategoryID] = @CategoryID, [QuantityPerUnit] = @QuantityPerUnit, [UnitPrice] = @UnitPrice, [UnitsInStock] = @UnitsInStock, [UnitsOnOrder] = @UnitsOnOrder, [ReorderLevel] = @ReorderLevel, [Discontinued] = @Discontinued WHERE [ProductID] = @ProductID">
                
                    
                    
                    
                    
                    
                    
                    
                    
                    
                

                
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                

                
                    
                

            
    
    

    


File: Web.config


  
  
     providerName="System.Data.SqlClient" />