Dim ci As
New System.Globalization.CultureInfo("en-us")
Response.Write(ci.DateTimeFormat.ShortDatePattern.ToString)
Now When I test my Application it shows me the Formate set in Browsers Language.
But Whenever I deploy this it only shows me M/d/yyyy format regardless of Browsers Settings.
If i Change settings in my browser, even then it only shows M/d/yyyy format.
Have you set the culture="auto" in config? From my
article
: in IE the user can change the culture by going to Internet Options->General->Language. For
this to work, we need to set both the Culture and the UICulture to auto and
enableClientBasedCulture = true as:
GLOBALIZATION culture="auto" uiculture="auto" enableClientBasedCulture="”true”" />
Member
1 Points
305 Posts
How to Set Browsers Culture
Sep 19, 2006 11:51 PM|mistry_bhavin|LINK
Hello,
I have written this kind of code in my Web Page
Dim ci As New System.Globalization.CultureInfo("en-us")
Response.Write(ci.DateTimeFormat.ShortDatePattern.ToString)
Now When I test my Application it shows me the Formate set in Browsers Language.
But Whenever I deploy this it only shows me M/d/yyyy format regardless of Browsers Settings.
If i Change settings in my browser, even then it only shows M/d/yyyy format.
How can we change this?
Contributor
2369 Points
908 Posts
Re: How to Set Browsers Culture
Sep 22, 2006 12:38 AM|Gordon-Freeman|LINK
Hi~ No matter where the app's deployed, that pattern should be the same, as its for a specific culture but not browser setting~
But it's strange behavior in your machine~ Are u shure there's no other code that may cause that?
Star
9003 Points
3145 Posts
Re: How to Set Browsers Culture
Sep 22, 2006 02:20 PM|vivek_iit|LINK
Hi,
Have you set the culture="auto" in config? From my article
: in IE the user can change the culture by going to Internet Options->General->Language. For
this to work, we need to set both the Culture and the UICulture to auto and
enableClientBasedCulture = true as:
GLOBALIZATION culture="auto" uiculture="auto" enableClientBasedCulture="”true”" />
You can set this at the Page level too.
Hope this helps,
Vivek
Communifire: Social Networking and Business Collaboration Platform
Member
1 Points
305 Posts
Re: How to Set Browsers Culture
Sep 23, 2006 01:06 PM|mistry_bhavin|LINK
Star
9003 Points
3145 Posts
Re: How to Set Browsers Culture
Sep 23, 2006 04:01 PM|vivek_iit|LINK
>I have't cade any thing else then this
Sorry I did not understand this. Do you mean that you have already used the auto settings in the config?
-Vivek
Communifire: Social Networking and Business Collaboration Platform