Adobe ColdFusion 8

CCFXRequest::GetAttribute

Syntax

LPCSTR CCFXRequest::GetAttribute(LPCSTR lpszName)

Description

Retrieves the value of the passed attribute. Returns an empty string if the attribute does not exist. (To test whether an attribute was passed to the tag, use CCFXRequest::AttributeExists.)

Returns

Returns the value of the attribute passed to the tag. If no attribute of that name was passed to the tag, an empty string is returned.

Parameters

Parameter

Description

lpszName

Name of the attribute to retrieve (case insensitive)

Example

The following example retrieves an attribute named DESTINATION and writes its value back to the user:

LPCSTR lpszDestination = pRequest->GetAttribute("DESTINATION") ;
    pRequest->Write( "The destination is: " ) ;
    pRequest->Write( lpszDestination ) ;