Data Binding ASP.Net

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

    private decimal _totals = 0;
    protected void grdProducts_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            decimal totals = (decimal)DataBinder.Eval(e.Row.DataItem, "BoxOfficeTotals");
            _totals += totals;
        }
        if (e.Row.RowType == DataControlRowType.Footer)
        {
            Label lblSummary = (Label)e.Row.FindControl("lblSummary");
            lblSummary.Text = String.Format("Total: {0:c}", _totals);
        }
    }



    Summary Column


    
    

            id="grdProducts"
        DataSourceID="srcProducts"
        OnRowDataBound="grdProducts_RowDataBound"
        AutoGenerateColumns="false"
        ShowFooter="true"
        Runat="server">
        
                    DataField="Title"
            HeaderText="Title" />
        
        
            <%# Eval("BoxOfficeTotals", "{0:c}") %>
        

        
                            id="lblSummary"
                Runat="server" />
        

        
        

    
            id="srcProducts"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT * FROM Products"
        Runat="server" />
    

    


File: Web.config

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