Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Adding 2 values that together as decimals in c# asp.net

$
0
0
I have a value that I have got from gridview. I want to add another value and get a total. I am having trouble getting both to total.

The best I could do was "£10 + £2700 = £10£2700" not £2010 which is not what I wanted.

Here is my code.

            var total = (Label)gvConfirm.FooterRow.FindControl("lblGrndTotal");
            lblSubTotal.Text = total.Text;

            decimal pack = 10;
            lblPack.Text = packing;

            string gtotal = pack + total;


Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>