To calculate the sum of a column in a DataTable use the DataTable.Compute method.
DataTable dt; ... int sumValue; sumValue = dt.Compute("Sum(TheSumColumn)", string.Empty);
Display the result in your Total Amount Label like so:
lblTotalAmount.Text = sumValue.ToString();
How to solve 'Size property has an invalid size of 0' in C#
How to access session variable in App_Code class file?
Important Tips To Write Clean Code In C# from Debendra Dash
Using Code Blocks, Mixing Text & C# Code and Comments in Asp.NET MVC Razor
How to use column search in datatable when responsive is false