Data Binding ASP.Net

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


    protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
    {
        string oldExpression = GridView1.SortExpression;
        string newExpression = e.SortExpression;
        if (oldExpression.IndexOf(newExpression) < 0)
        {
            if (oldExpression.Length > 0)
                e.SortExpression = newExpression + "," + oldExpression;
            else
                e.SortExpression = newExpression;
        }
        else
        {
            e.SortExpression = oldExpression;
        }
    }



    Untitled Page


    
    

                     DataKeyNames="CustomerID" AutoGenerateColumns="False"
             AllowSorting="True" OnSorting="GridView1_Sorting">
            
                                     DataField="CustomerID"
                     SortExpression="CustomerID">
                                     SortExpression="CompanyName">
                                     SortExpression="ContactName">
                                     SortExpression="ContactTitle">
                                     SortExpression="Address">
                                     SortExpression="City">
                                     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" />