Dim CartSum As Double = 0.0 Sub UpdateCartSubTotal(ByVal sender As Object, _ ByVal e As DataGridItemEventArgs) 'Item or AlternatingItem ? If e.Item.ItemType = ListItemType.Item Or _ e.Item.ItemType = ListItemType.AlternatingItem Then 'Snip out the ViewCount Dim viewCount As Double = _ Convert.ToDouble(DataBinder.Eval(e.Item.DataItem, "Retail")) CartSum += viewCount ElseIf e.Item.ItemType = ListItemType.Footer Then e.Item.Cells(3).Text = _ "<P align='right'>Subtotal: </P>" e.Item.Cells(4).Text = _ "<P align='right'>" & Format(CartSum, "0.00") & "</P>" End If End Sub
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams