How to configure invariant culture in ASP.NET globalization?

Mike Chaliy picture Mike Chaliy · Jul 8, 2009 · Viewed 77k times · Source

I need to fix CurrentCulture as the invariant culture in an ASP.NET application. How can I do this?

<configuration>
   <system.web>
      <globalization culture="???" />
   ...

Answer

Shravan picture Shravan · Jan 5, 2012

Either add the following to your web.config file:

<system.web>
    <globalization culture="en-US" uiCulture="en-US" />
</system.web>

or you can add this statement on the page:

<%@ Page uiCulture="en-US" culture="en-US" %>

Hope this helps.