CountryCode Property

The CountryCode property returns the two-letter country code for the country associated with the IP address of the currently initialized CountryHawk object. The return value is always in uppercase.


 countryCodeAsStr = chObj.CountryCode


String representing the two-letter country code for the IP address that chObj is initialized to. For example, "US" for United States and "CA" for Canada. These two-letter country codes are defined in your file.


set chObj = Server.CreateObject("cyScape.countryObj")

response.write "Your country code is: " & chObj.CountryCode

chObj.Initialize ""

response.write "Country code for is: " & chObj.CountryCode

See the ch_basics.asp sample for more information.

Note: This property is read-only.

See Also:

About the Properties and Methods Guide

RegionCode Property

IPAddr property

Initialize method

CountryName method

RegionName Method

GetSelectList method

IsValidIP method

IsRestricted method

RegionNameFromCountryCode Method

IsInList method

About the sample scripts