I have an application that runs on an Anglo-American ASP.NET server (English installation of a Windows server and .NET Framework). I set the globalization options to:
<globalization culture="auto" uiCulture="auto" responseEncoding="utf-8"/>
which is great for most applications. However, I have to deal with money transactions in this application, and I need to provide numbers in the format of 0.00 (not 0.00). Most of our users use an application from a culture that uses 0.00.
I found out that even when using Decimal.ToString("0.00")decimals, they still printed as 0.00 in French browsers.
What is the correct way to solve this problem? Do I have to change the current culture for a function where I need to deal with numbers in order to set it to EN-US at the moment? Will I always get the correct format if I use Decimal.ToString("0.00", NumberFormatInfo.InvariantInfo)?
Thanks!
source
share