protected void gridviewShoppingCart_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { _totalcounter += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "TotalPrice")); } labelSubTotal.Text = string.Format("{0:c}", _totalcounter); labelTax.Text = string.Format("{0:c}", (CalculationManager.CalcSalesTax(_totalcounter))); }