Data Binding ASP.Net Tutorial

<%@ Page Language="C#" %>
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


    Show Fields


    
    

            id="dtlProducts"
        DataSourceID="srcProducts"
        AutoGenerateRows="false"
        Runat="server">
        
                    DataField="Title"
            HeaderText="Product Title:" />
                    DataField="Director"
            HeaderText="Product Director:" />
                    DataField="Totals"
            DataFormatString="{0:c}"
            HeaderText="Box Office Totals:" />
        

    
            id="srcProducts"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Id,Title,Director,Totals FROM Products
            WHERE Id=1"
        Runat="server" />
    

    


File: Web.config

  
             connectionString="Data Source=.\SQLEXPRESS;
         AttachDbFilename=|DataDirectory|MyDatabase.mdf;Integrated Security=True;User Instance=True" />