Thousand Seperator
-
Hi Friends, I am using a repeater control which have footer. i have placed a asp:label control in the footer. When i run the page label is showing its value like "1234.00" but i want to display like "1,234.00". How to do that. Thanks in advance. Regards, Gourav Tyagi.
-
Hi Friends, I am using a repeater control which have footer. i have placed a asp:label control in the footer. When i run the page label is showing its value like "1234.00" but i want to display like "1,234.00". How to do that. Thanks in advance. Regards, Gourav Tyagi.
string valueString = string.Format("{0:0,0.00}", myValue);
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
Hi Friends, I am using a repeater control which have footer. i have placed a asp:label control in the footer. When i run the page label is showing its value like "1234.00" but i want to display like "1,234.00". How to do that. Thanks in advance. Regards, Gourav Tyagi.
Something like this?
using System.Globalization
CultureInfo ci = new CultureInfo("es-ES");
NumberFormatInfo myFormat = ci.NumberFormat;
myFormat.NumberGroupSeparator = ",";
myFormat.NumberDecimalDigits = 2;
string MyFormattedString = MyDoubleValue.ToString("N", myFormat);The endusers' culture should determine how the number is formatted. That's usually configured in the Windows regional settings.
I are Troll :suss: