Data Binding ASP.Net Tutorial

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


    DataPager ListView


    
    

                    ID="lstProducts"
            DataSourceId="srcProducts"
            runat="server">
            
                

                                        id="itemPlaceholder"
                        runat="server" />
                    

                                    id="pg"
                    PageSize="2"
                    Runat="server">
                    
                                                    ShowFirstPageButton="true"
                            ShowPreviousPageButton="true"
                            ShowNextPageButton="false"
                            ShowLastPageButton="false" />
                        
                                                    ShowFirstPageButton="false"
                            ShowPreviousPageButton="false"
                            ShowNextPageButton="true"
                            ShowLastPageButton="true" />
                    

                
            

            
                

  •                 <%# Eval("Title") %>
                    

  •             

            
                        id="srcProducts"
                SelectCommand="SELECT Id, Title, Director FROM Product"
                ConnectionString='<%$ ConnectionStrings:con %>'
                Runat="server" />
        

        


    File: Web.config

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