Avatar of JMS1965
JMS1965
Flag for United States of America asked on

ASP.NET: Regional Currency Formats across Different Browsers

I have an ASP.NET application, which should display currency and date values in the format of the user's region.  I thought that the region could be determined from the browser, but maybe not in all browsers?

For example, in a gridview there is a column that displays currency values. The format string for the column is "c2".  Viewing this page with Internet Explorer, I can go to Tools --> Internet Options --> Languages; and if I change the language from "en-US" to any other culture, the currency format is changed to match the selected culture, as desired.

But, I have a user in the United Kingdom who says that viewing the gridview on his iPhone or iPad, the values are displayed for the U.S. (using the dollar symbol in currency and month before day in dates).

What can be done so that dates and currency values are formatted appropriate to the user's region / culture, regardless of the browser being used?

Thanks in advance -
Julie

P.S. This is a large site where dates and currency values are used on most pages.
ASP.NETWeb Browsers

Avatar of undefined
Last Comment
JMS1965

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
David Johnson, CD

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Rahul Agarwal

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Kamal Khaleefa

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
JMS1965

ASKER
Okay, so it looks like this can be handled in either of these ways:

1.  Provide a drop-down list of cultures so the user can choose

or

2.  Determine the culture from the IP address.

I know how to do #1; I'll just need to find a list of the cultures to present to the user.

For #2, I searched a bit and found examples of how to get the user's IP, but wasn't able to find an example of how to determine the culture from that.

I think I'll plan on using option #1, unless there's an advantage to using option #2?

I'll leave this open topic open for a bit in case there's any additional information I should consider.

Thanks very much!
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23