Data Binding ASP.Net

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


    Binding to a Method
    
        protected string GetImageName(object dataItem)
        {
            int reorderPoint = Int32.Parse(DataBinder.Eval(dataItem, "ReorderPoint").ToString());
            if (reorderPoint < 100 )
                return "LessThan100.bmp";            
            else
                return "MoreThan100.bmp";
        }
    


    
    

                    ProviderName="System.Data.SqlClient" 
            ConnectionString="<%$ ConnectionStrings:AdventureWorks %>"
            SelectCommand="Select ProductID, Name, ProductNumber, DaysToManufacture, SellStartDate, ReorderPoint from Production.Product">            
        
                   AutoGenerateColumns="False">              
            
                
                    
                        
                            <%# Eval("ProductID") %> - <%# Eval("Name") %>                            
                       

                        
                        
                            
                                  Product Number: <%# Eval("ProductNumber") %>
                                  Days to manufacture:<%# Eval("DaysToManufacture") %> 
                                  Start Date: <%# Eval("SellStartDate", "{0:MM/dd/yy}") %>                                  
                            

                            
                            ' />
                            Reorder Point:<%# Eval("ReorderPoint") %>
                        

                    

                 
            

       
    

    


File: Web.config

  
  
                     connectionString="Data Source=localhost\SQLEXPRESS;Initial Catalog=AdventureWorks;Integrated Security=True"
             providerName="System.Data.SqlClient" />