ADO Database ASP.Net






    Untitled Page


    
    

                    DataKeyNames="CustomerID" AutoGenerateColumns="False"
            AllowSorting="True" AllowPaging="True"
            AutoGenerateEditButton="true" AutoGenerateDeleteButton="true">
             
                               FirstPageText="Go to the first page" 
                  LastPageText="Go to the last page" Mode="NextPreviousFirstLast">
             
            
                                                HeaderText="CustomerID" 
                                DataField="CustomerID"
                                SortExpression="CustomerID" 
                                Visible="False">
                                                    DataNavigateUrlFields="CustomerID,Country" 
                                    SortExpression="CompanyName"
                                    DataNavigateUrlFormatString = "http://www.yourServer.com/Customer.aspx?id={0}&country={1}"
                                    DataTextField="CompanyName">
                
                                                DataField="ContactName"
                                SortExpression="ContactName">
                                                DataField="ContactTitle"
                                SortExpression="ContactTitle">
                                                DataField="Address"
                     SortExpression="Address">
                                     SortExpression="City">
                                     DataField="Region" SortExpression="Region">
                                     SortExpression="PostalCode">
                                     SortExpression="Country">
                                     SortExpression="Phone">
                                     SortExpression="Fax">
            

        
                     SelectCommand="SELECT * FROM [Customers]"
             ConnectionString="<%$ ConnectionStrings:AppConnectionString1 %>"
             DataSourceMode="DataSet"
             UpdateCommand="UPDATE [Customers] SET [CompanyName] = @CompanyName,
                  [ContactName] = @ContactName, [ContactTitle] = @ContactTitle,
                  [Address] = @Address, [City] = @City, [Region] = @Region, 
                  [PostalCode] = @PostalCode, [Country] = @Country, [Phone] = @Phone,
                  [Fax] = @Fax WHERE [CustomerID] = @original_CustomerID">
                  
           
           
        

             
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 
             

                 
    

    


File: Web.config

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