ASP.NET:
For a new web visitor, how can we get the default currency that they use?
E.g. if they are browsing from a web browser in Canada, how can we get (in some aspx.vb code) "CAD" so we can display that on page1.aspx?
ASP.NET:
For a new web visitor, how can we get the default currency that they use?
E.g. if they are browsing from a web browser in Canada, how can we get (in some aspx.vb code) "CAD" so we can display that on page1.aspx?
There is no browser API to get the user's currency.
There are various ways of determining the user's location, including IP lookups and the Geolocation API. A full list of options is shown on this StackOverflow answer.
You would then need a lookup table to map countries to currencies.
If most of your customers come from one country, it may be easiest to default to that currency and provide a dropdown box for them to change it if needed.
You can get the user IP address and then detect their country of origin. From the country information, you can display the appropriate currency.
I found one 3rd party site with ASP sample codes (need to modify it to VB.NET).