Hi, all,
I am wanting to display currency in a TextBox, but without the "$".
Also, if the end user types in a negative sign before the numbers, the entire amount is surrounded in ().
I have the first part working, but I am unable to get the "$" to go away.
The above works without an issue.Code:StartingBalanceAsset.Text = Convert.ToDecimal(StartingBalanceAsset.Text).ToString("C2")
If I type in 123456, the value is then converted to $123,456.00
If I type in -123456, the value is then converted to ($123,456.00)
I tried to use the following to remove the "$" and nothing happens. No errors either.
Any suggestions?Code:StartingBalanceAsset.Text.Replace("$", String.Empty)




Reply With Quote