Wednesday, March 28, 2012

AJAX Beta 1 has forced my pages to US Date format !

Since adding AJAX Beta 1 to my PC all my IIS sites are now showing and requiring dates in MM/dd format instead of dd/MM as they were before.

I have tried:

<globalization culture="en-NZ" uiCulture="en-NZ"/> in by config file and set each page to the same.

Anyone else know why this is and how I can get around this issue ?

Thanks

Matthew Hill

hello.

hum...strange...atals used to have some globalization support but in only influenced client side locale methods. how are you putting the dates on the pages?


I have FormView & GridView controls that display various data from a database. The queries to the database returns the dates as Date fields as per normal but since adding AJAX Beta 1 and the corresponding AJAX Toolkit the dates are showing as MM/dd/yyyy. I set the locale to en-NZ in every page and in the global settings but still they are showing wrong. I also checked my locale settings.

Is it possible that something may be corrupt in the website?

Mat


hello.

though i'm no globalization expert, i think that the problems you're facing are related with ASP.NET and not AJAX extensions. It's really strange that it only has affected your app after adding the extensions...does removing the extensions solve the issue?


Thanks for your reply.

I have tested copying it to another server with AJAX and the dates are around the right way. I still can't figure out why none of the settings are changing the dates back to en-NZ. If I view the site from another PC it is around the wrong way. Argggghhh.

Mat


hello.

quick question: are you pages configured to use localization? if so, are they configured so that they get the values from the browser? if that is tru, then what might be happening is that the browser may be using US culture by default and sending that info back to the site...


I have checked and can't find a US date setting anywhere in IIS, IE7, Regional Settings, Visual Studio, Ajax, Ajax Toolkit. I'm hoping it's not gettings it's settings from the system's Regional properties (the ones created during Windows install) as I don't know how to change them. Also I don't know why they have only just started to effect IIS.

If you visit my website from another PC it shows in US format too, so it is definately an IIS issue.'

Mat


I have checked and can't find a US date setting anywhere in IIS, IE7, Regional Settings, Visual Studio, Ajax, Ajax Toolkit. I'm hoping it's not gettings it's settings from the system's Regional properties (the ones created during Windows install) as I don't know how to change them. Also I don't know why they have only just started to effect IIS.

If you visit my website from another PC it shows in US format too, so it is definately an IIS issue.'

Mat


In ScriptManager's element try to add attribute EnableScriptGlobalizationwith value false:

<atlas:ScriptManagerrunat="server"ID="scriptManager"EnableScriptGlobalization="false"EnablePartialRendering="true"/>

Probaly it's because of your preffered languages in IE7 (as rule there is "English [en-us]").

No comments:

Post a Comment