I have a small ASP.NET MVC site that displays salary details for employees.
<td align="right">@String.Format("{0:c}", Model.Salary)</td>
On my local machine this displays fine e.g. £66,000, however when uploaded to Azure it is displaying with a dollar e.g. $66,000.
When setting up I chose western Europe as my location but I obviously need to do something else tfor this to display in £s. Any ideas?
You need to set specific culture at application level in web.config as below
<configuration>
<system.web>
<globalization uiCulture="en-GB" culture="en-GB" />
</system.web>
</configuration>
Alternatively you can also set below to Application_PreRequestHandlerExecute() in global.asax file
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With