473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

get client user culture info

Hi;

How do I get the client user culture? I need to get the names for the
weeks/months, num days/week, months/year, days/month, etc to display date
selections to the user correctly.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Jun 22 '06 #1
1 4149
Hi David,

ASP.NET 2.0 has a new feature called 'Auto-Culture Handling': it maps
Accept-Language headers to CultureInfo objects and attaches them to the
current thread. Auto-Culture handling can be enabled for individual pages
by including 'Culture="auto" UICulture="auto"' attributes in the @ Page
directive. It can be enabled site-wide by including a <globalization
culture="auto" uiCulture="auto"/> element in web.config.

Then you can access the DateTimeFormatInfo.Current instance to get the
various info you needed.

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dejan Vesic | last post by:
I found nasty "documentation" bug; ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemglobalizationcultureinfoclasstopic.htm claims that proper culture info name for Serbian (Cyrillic) - Serbia...
3
by: Ashish | last post by:
I have a application in which culture settings are customizable, they dont depend on the machine settings on which the application is running, I need to make sure that all the threads running in...
0
by: jason | last post by:
Hello. Newbie question for sure. I've got this simple web service (.asmx) function that works fine when called remotly from asp.net client web page. The dll compiled output from the wsdl...
4
by: Claes Bergefall | last post by:
I would like to format dates etc in the format that the user browsing the page would prefer according to his language setting. The DateTimeFormatInfo class provides all the information I need, but...
0
by: arun.goel | last post by:
Hi All, I have recently upgraded a smartclient application to .net 2.0. What really baffles me is that the app works fine in debug/release mode. But when I create a setup package or try to run...
0
by: =?Utf-8?B?UmljaGFyZCBDb2xsZXR0ZQ==?= | last post by:
My goal is to connect a WSE 3.0 client to a WCF asp.net hosted service, utilizing MTOM encoding and if at all possible, streamedRequest transfer mode. I am starting with a basic Hello World...
4
by: Olivier Matrot | last post by:
Hello, I have a problem with an ASP.NET 2.0 Application. A client request is processed in parrallel by two threads. This ends with the following exception : <Source>System</Source> <StackTrace...
2
by: tamirmalas | last post by:
Hi, iam trying to set a culture info different than the current culture info on the system, the code compiles fine, but nothing happens, and the system culture is the one used for the program. ...
0
by: austincolby | last post by:
I am working on creating a SOAP client in Visual Studio 2008 for the first time but am running into a few issues. I added the Web Service reference to the project and am able to see the namespace...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.