Data Binding ASP.Net Tutorial






    Untitled Page


    
    

                     DataKeyNames="CustomerID" AutoGenerateColumns="False"
             AllowSorting="True" AllowPaging="True" PageSize="10">
             
                               FirstPageText="Go to the first page" 
                  LastPageText="Go to the last page" Mode="NextPreviousFirstLast">
             
            
                                     DataField="CustomerID"
                     SortExpression="CustomerID">
                                    DataNavigateUrlFields="CustomerID,Country" SortExpression="CompanyName"
                    DataNavigateUrlFormatString=
                        "http://www.foo.com/Customer.aspx?id={0}&country={1}"
                    DataTextField="CompanyName">
                
                                     SortExpression="ContactName">
                                     SortExpression="ContactTitle">
                                     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"
            ConflictDetection="CompareAllValues" EnableCaching="True"
            CacheKeyDependency="MyKey" CacheDuration="Infinite">
         
    

    


File: Web.config

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