开发者

Since upgrading a website from ASP.NET 3.5 to ASP.NET 4.0 my dates come out in US format

开发者 https://www.devze.com 2022-12-27 17:53 出处:网络
Since upgrading a website from ASP.NET 3.5 to ASP.NET 4.0 my dates come out in US f开发者_Python百科ormat, ie

Since upgrading a website from ASP.NET 3.5 to ASP.NET 4.0 my dates come out in US f开发者_Python百科ormat, ie 3/24/2010. How can I change it back to UK format (24/3/2010) for all pages on my site? Is there a default setting somewhere?


Sorry, I've found the answer myself:

You add the following within system.web section in the web.config file.

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

I can only presume that .NET 4 ignores the machines own settings now :( Or perhaps theres another place it's defined for .NET that's even higher than web.config?

0

精彩评论

暂无评论...
验证码 换一张
取 消