Data Binding ASP.Net

<%@ Page Language="VB" %>


    Protected Sub GridView1_Sorting(ByVal sender As Object, ByVal e As GridViewSortEventArgs)
    
        Dim oldExpression As String = GridView1.SortExpression
        Dim newExpression As String = e.SortExpression
        If (oldExpression.IndexOf(newExpression) < 0) Then
            If (oldExpression.Length > 0) Then
                e.SortExpression = newExpression & "," & oldExpression
            Else
                e.SortExpression = newExpression
            End If
        Else
            e.SortExpression = oldExpression
        End If
    End Sub



    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" />