如何对中继器中的列求和

Here is my repeater

<asp:Repeater runat="server" ID="repBasket">
<ItemTemplate>
    <li>
        <a href="http://stylo.senseithemes.com/?product=flying-ninja">
            <img width="100" height="130" src="http://stylo.senseithemes.com/wp-content/uploads/2013/06/poster_2_up-100x130.jpg" class="attachment-shop_thumbnail wp-post-image" alt="poster_2_up">
            <%#Eval("ProductName") %>
        </a>
        <span class="quantity">
            Quantity:  <%#Eval("Quantity")%> x
            <span class="price">
                <span class="amount"><%#Eval("ProductPrice") %></span>
            </span>
        </span>
        <div class="product-remove">
            <a href="http://stylo.senseithemes.com/?page_id=16&amp;remove_item=7cbbc409ec990f19c78c75bd1e06f215&amp;_n=294a49ca25" class="btn-remove" title="Remove this item">×</a>                
        </div>
    </li>
</ItemTemplate>


here is the code behind I get products by Session Id

using (DermabonEntities db = new DermabonEntities())
{
var q = (from d in db.Basket
         where d.UserId == sessionId
         select d).ToList();

repBasket.DataSource = q;
repBasket.DataBind();

int UrunAdet = (from d in db.Basket
                where d.UserId == sessionId
                select d).Count();

Label.Text = UrunAdet.ToString();                   
}

I need to sum ProductPrice in the repeater How can I sum it ?

at the end of your query you can calculate the total using the code below:

   TotalPrice =  q.Aggregate(0D, (runningTotal, next) => 
                     runningTotal + (next.Quantity * next.ProductPrice));

and you can set this value to a public or protected property to display it on your web form.

   public double TotalPrice 
     {
        get { return Convert.ToDouble(ViewState["TotalPrice"]); }
        set { ViewState["TotalPrice"] = value; }
     }