I am working on a Point of sale module for a web application. I need help ensuring my data stays in a money format ie 0.00



Here's my code:
Code:
01
            Double res = Double.Parse(PriceTxtBox.Text);
02
            res = res * Double.Parse(QtyTxtBox.Text);
03
            ItemTotalTxtBox.Text = res.ToString();
04
 
05
            if (ItemTotalTxtBox != null)
06
            {
07
                Double rs = Double.Parse(ItemTotalTxtBox.Text);
08
                rs = (rs * (.075)) + Double.Parse(ItemTotalTxtBox.Text);
09
 
10
                Double ts = (rs *(.075));
11
 
12
                TotalTxtBox.Text = rs.ToString();
13
                TaxTxtBox.Text = ts.ToString();
14
            }
I can handle constraing the input on the client side.

When PriceTxtBox is 2 and QtyTxtBox is 3 I need the result to be 6.00 not 6 like I am getting now.

When ItemTotalTxtBox is 4.67 I need TotalTxtBox to be 0.35 not 0.35025 like I am getting now.



Thanks in advance.