[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 615
  • Last Modified:

Asp mvc globalization

Hi Experts,

I have an ASP.Net mvc application and I am having some issues with dates. When developing, I am locally getting correct date formatting, but when I upload, the dates are all backwards in US format. My dev machine is set to english (UK), and my hosting server is in the US.

Is there an easy way I can set the global culture of the site to be en-UK?
0
critto
Asked:
critto
1 Solution
 
jamesbaileCommented:
For a single page set the culture.

<%@ Page UICulture="es" Culture="es-MX" %>

or add use

<globalization
    enableClientBasedCulture="true|false"
    requestEncoding="any valid encoding string"
    responseEncoding="any valid encoding string"
    fileEncoding="any valid encoding string"

    responseHeaderEncoding = "any valid encoding string"
    resourceProviderFactoryType = string
    enableBestFitResponseEncoding = "true|false"

    culture="any valid culture string"
    uiCulture="any valid culture string"/>

in the system.web section of your config file
0
 
crittoAuthor Commented:
Thanks James. I love it when someone writes a chunk of code that is exactly what you need and works perfectly. no link to an article etc etc.

Brilliant. Wicked. Cheers.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now