Adobe ColdFusion 8

CCFXRequest::AttributeExists

Syntax

BOOL CCFXRequest::AttributeExists(LPCSTR lpszName)

Description

Checks whether the parameter was passed to the tag. Returns True if the parameter is available; False, otherwise.

Parameters

Parameter

Description

lpszName

Name of the parameter to check (case insensitive)

Example

The following example checks whether the user passed an attribute named DESTINATION to the tag, and throws an exception if the attribute was not passed:

if ( pRequest->AttributeExists("DESTINATION")==FALSE )
    {
        pRequest->ThrowException(
            "Missing DESTINATION parameter",
            "You must pass a DESTINATION parameter in "
            "order for this tag to work correctly." ) ;
    }