There are several ways to determine a vistor's country through ASP.
The most reliable method is to look up the visitor's IP address and determine the country from that but that requires a large IP address database or call to another web site and there is usually a cost associated with these methods (31-Jan-08 update: see http://www.ourline.com/asp/findip.asp
for a free script and database).
A simpler (and free) method is to try and determine the location based on the visitor's language settings.
The server variable 'HTTP_ACCEPT_LANGUAGE' will return a 2 or 5 character string with the visitor's language setting (assuming they have selected it correctly). You can then use this string to lookup what country(s) that language setting is associated with.
Whilst hardly a perfect solution, this method works quite reliably for determining major countries.
Here is a sample script that attempts to return a 2-digit country code based on this variable.Run Sample
A better implementation of this method would be to have a lookup database which lists each of the possible language settings and looks up the most likely country.
The complete list of possible languages:
Chinese/Hong Kong (zh-hk)
English/United Kingdom (en-gb)
English/United Satates (en-us)
English/New Zealand (en-nz)
English/South Africa (en-za)
Indonesian (id or in)
Italian/ Switzerland (it-ch)
Russian /Moldavia (ru-mo)
Scots Gaelic (gd)
Spanish (es or es-do)
Spanish/Costa Rica (es-cr)
Spanish/El salvador (es-sv)
Spanish/Puerto Rico (es-pr)