This method is used to determine whether a visitor is coming in from a country marked as restricted.
Syntax:
bIsRestricted = chObj.IsRestricted()
Returns true if the CountryObj represents a country marked as restricted in the countries.properties file.
bIsRestricted = chObj.IsRestricted(string countryCodeList )
Returns true if the CountryObj represents a country that matches any of the specified country codes in the countryCodeList parameter. If specified, this parameter must contain one or more two-letter country codes separated by spaces.
Returns:
The immutable CountryObj instance for a particular IP address.
VB.NET Example:
dim chObj as CountryObj = CountryObj.GetCountry()
Response.Write("Your country is ")
if (chObj.IsRestricted() = false)
Response.Write("NOT ")
end if
Response.Write("restricted.")
C# Example:
CountryObj chObj = CountryObj.GetCountry();
Response.Write("Your country is ");
if (chObj.IsRestricted() == false)
Response.Write("NOT ");
Response.Write("restricted.");
Note: See the ch_restricted_vb.aspx sample for more information.