Format number without decimal using c# and asp.net
Posted on 2006-10-24
I have the following code:
double dblDeductible = double.Parse(reader["DEDUCTIBLE_SIR"].ToString());
this.txtDeductible.Text = dblDeductible.ToString("C");
and I get the result of $2000.00. I know if I change ToString from a "C" to a "G", I drop the dollar sign. I want to know how to drop the decimal (".00") so it becomes just 2000 or $2000.
Thanks for any help...