Currency / Culture Issue ASP.NET MVC

In a number of places in my code, I convert values ​​to currency using the ToString method c: .ToString ("c")

On my dev machine, this correctly formats the values ​​according to my regional settings, and as a result, the currency is displayed as such: £ 100.00

However, on a production server, it ignores the regional settings of Windows and instead performs the configuration set in the USA:

$ 100.00

I had a similar problem with DateTimes, but converted to ISO 8601 format.

Where does the production server choose this from?

+4
source share
2 answers

Set the correct culture in the file web.config:

<globalization uiCulture="en-GB" culture="en-GB" />

: http://msdn.microsoft.com/en-uS/library/bz9tc508.aspx

+2

Culture ToString

number.ToString("c", new CultureInfo("en-GB"))
0

All Articles