Data Binding ASP.Net Tutorial

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


    Record Editor


    
    

                                  runat="server" 
                          AutoPostBack="True" 
                          Width="280px" 
                          DataSourceID="sourceProducts" 
                          DataTextField="ProductName" 
                          DataValueField="ProductID">
        
        
        
            
                
                
                
            

        

                                                         runat="server" 
                                     DataSourceID="sourceProductDetails"
                                     Height="50px" 
                                     Width="200px" 
                                     AutoGenerateEditButton="True">
                    
                

                                   runat="server"
                           ProviderName="System.Data.SqlClient"
                           ConnectionString="<%$ ConnectionStrings:Northwind %>"
                           SelectCommand="SELECT ProductName, ProductID FROM Products"/>
                                   runat="server"
                           ProviderName="System.Data.SqlClient"
                           ConnectionString="<%$ ConnectionStrings:Northwind %>"
                           SelectCommand="SELECT ProductID, ProductName, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued FROM Products WHERE ProductID=@ProductID"
                           UpdateCommand="UPDATE Products SET ProductName=@ProductName, UnitPrice=CONVERT(money, @UnitPrice), UnitsInStock=@UnitsInStock, UnitsOnOrder=@UnitsOnOrder, ReorderLevel=@ReorderLevel, Discontinued=@Discontinued WHERE ProductID=@ProductID">
           
               
           

        
        
        

    


File: Web.config