The RegionCode property returns the region code for which the particular instance of the CountryObj class contains data for. The return value is always in lowercase. See the section on Defining Regions for more information on how region codes are defined.
Syntax:
countryRegion = chObj.RegionCode
Returns:
The region code, as defined in the regions.properties file, for which the particular instance of the CountryObj class contains data for. For example, "northamerica".
VB.NET Example:
dim chObj as CountryObj = CountryObj.GetCountry()
Response.Write("Your region code is: " + chObj.RegionCode)
chObj = CountryObj.GetCountry("207.46.230.220")
Response.Write("<br>Region code for 207.46.230.220 is: " + chObj.RegionCode)
chObj = CountryObj.GetCountry("FR")
Response.Write("<br>Region code for France is: " + chObj.RegionCode)
C# Example:
CountryObj chObj = CountryObj.GetCountry();
Response.Write("Your region code is: " + chObj.RegionCode);
chObj = CountryObj.GetCountry("207.46.230.220");
Response.Write("<br>Region code for 207.46.230.220 is: " + chObj.RegionCode);
chObj = CountryObj.GetCountry("FR");
Response.Write("<br>Region code for France is: " + chObj.RegionCode);
Note: See the ch_basics_vb.aspx, ch_statsByRegion_vb.aspx, and ch_statsByCountry_vb.aspx samples for more information.
Note: This property is read-only.
Note: Use of this property requires the Enterprise Edition of CountryHawk.
See Also: