nightstalker — 2005-07-20T08:54:54-04:00 — #1
On my website i have numbers that get calculated according to what the use types in. I need the number 2 be forced to 2 decimal places.
At the moment im using Math.Round(decOne,2);
that changes this: 65.231 into 65.23
but if the user types in 65 it stays 65 and doesn't give me 65.00. Is there anyway to make the number to force 2 decimal places?
I hope i explained this correctly.
puco — 2005-07-20T08:56:41-04:00 — #2
nightstalker — 2005-07-20T09:04:15-04:00 — #3
Thanks a lot for the quick reply. It works great.
drochili — 2005-07-20T09:06:11-04:00 — #4
You mean to show it as decimal in a textbox or label right? I'm pretty sure that in your single or double variable, it will be as 65.00, but in the textbox/label, you can format it using toString.
Hopefully this link helps:
drochili — 2005-07-20T09:06:30-04:00 — #5
whoops.. got beat to posting the reply
mittineague — 2014-09-20T02:07:16-04:00 — #6
This topic is now archived. It is frozen and cannot be changed in any way.