Hello,
I am trying to format prices to two decimal places, but seem unable to find a way to do this. The code I am using at present is as follows (were product_price is the name of the variable containing the price):
lblPrice.Text = String.Format("{0:#.0}", product_price)
This, however, like other methods I have used does not format the prices correctly.
The prices are currently displayed in the following formats:
3999
999
467000
What I need is for them to be displayed in a correct currency format e.g., 3999 should be displayed as £39,99.
Is there an easy way to do this please?
Thanks!
I am trying to format prices to two decimal places, but seem unable to find a way to do this. The code I am using at present is as follows (were product_price is the name of the variable containing the price):
lblPrice.Text = String.Format("{0:#.0}", product_price)
This, however, like other methods I have used does not format the prices correctly.
The prices are currently displayed in the following formats:
3999
999
467000
What I need is for them to be displayed in a correct currency format e.g., 3999 should be displayed as £39,99.
Is there an easy way to do this please?
Thanks!