|
-
Jan 7th, 2008, 09:22 AM
#1
Thread Starter
Member
formatting decimals ...
consider I have this value ..
2.4
how do I format this using String.Format or any other way in my aspx page so it prints 2.4 but when the value is 2.0 it only prints 2 ??
-
Jan 7th, 2008, 10:14 AM
#2
Re: formatting decimals ...
-
Jan 8th, 2008, 01:28 PM
#3
Thread Starter
Member
Re: formatting decimals ...
-
Jan 8th, 2008, 01:40 PM
#4
Re: formatting decimals ...
-
Jan 8th, 2008, 04:26 PM
#5
Thread Starter
Member
Re: formatting decimals ...
-
Jan 8th, 2008, 06:15 PM
#6
Re: formatting decimals ...
 Originally Posted by chocoloco
that did not work.
Can you be a little more vague?
-
Jan 8th, 2008, 06:16 PM
#7
Re: formatting decimals ...
(String.Format("{0:g}", Convert.ToDouble("2.000")))
-
Jan 9th, 2008, 07:52 AM
#8
Thread Starter
Member
Re: formatting decimals ...
 Originally Posted by mendhak
(String.Format("{0:g}", Convert.ToDouble("2.000")))
That worked. thanks
-
Jan 9th, 2008, 08:06 AM
#9
Re: formatting decimals ...
What were you trying the first time?
-
Jan 9th, 2008, 08:18 AM
#10
Thread Starter
Member
Re: formatting decimals ...
 Originally Posted by mendhak
What were you trying the first time?
Didn't do Convert.ToDouble
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|