Data Binding ASP.Net Tutorial

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


    
    .content
    {
        width:600px;
        border:solid 1px black;
        background-color:white;
    }
    .products
    {
        border-collapse:collapse;
    }
    .products th,.products td
    {
        padding:10px;
        border-bottom:1px solid black;
    }
    .alternating
    {
        background-color:#eeeeee;
    }
    
    Show Repeater Table


    
    
            id="rptProducts"
        DataSourceID="srcProducts"
        Runat="server">
        
        
        
            Product Title
            Product Director
            Box Office Totals
        
        

        
        
            <%#Eval("Title") %>
            <%#Eval("Director") %>
            <%#Eval("Totals","{0:c} ") %>
        
        

        
        
            <%#Eval("Title") %>
            <%#Eval("Director") %>
            <%#Eval("Totals","{0:c} ") %>
        
        

        
        
        

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

    


File: Web.config

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