-1

I am wanting my label to show what the total price of a product is after discount. My label does show the total price after the discount but I can't figure out how to add 2 decimal places to the final price. For example if the total price after a discount is $90 I would like my label to show $90.00. I can only figure out how to display the price without decimals.

lblTotalPrice.Text = "$" + Convert.ToString(totalPrice);
Cory
  • 145
  • 4
  • 12
  • I couldn't find the question from searching. Sorry for creating a duplicate question. – Cory Mar 01 '17 at 02:47

1 Answers1

0
lblTotalPrice.Text = "$" + totalPrice.ToString("0.##");
Sajeetharan
  • 216,225
  • 63
  • 350
  • 396