IsInList Method

The IsInList method returns True if the CountryCode property is within a list of country codes specified at run-time, or False otherwise.

Syntax:

 IsInList = chObj.IsInList(CountryCodesAsStr)

RestrictedCountryCodesAsStr: This must contain a list of one or more valid country codes separated by spaces (i.e. "US CA UK").

Returns:

Returns True if the CountryCode property for chObj is contained within the list of country codes specified by the RestrictedCountryCodesAsStr property, or False otherwise.

Example:

<%

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

if chObj.IsInList("US CA UK") then

 response.redirect "/english.asp"

else

response.redirect "/international.asp"

end if

%>

See Also:

About the Properties and Methods Guide

CountryCode property

RegionCode Property

IPAddr property

Initialize method

CountryName method

RegionName Method

GetSelectList method

IsValidIP method

RegionNameFromCountryCode Method

IsRestricted method

About the sample scripts

CountryStats Object Properties and Methods

RegionStats Object Properties and Methods