CFINVOKE Passing parameters by using attribute format

Found this useful today:
You can pass parameters in the cfinvoke tag as tag attribute name-value pairs, as the following example shows. You can also use a relative path to the CFC.

<cfinvoke component="/path/to/authQuery" method="getAuthSecure"
lastName="#session.username#" pwd="#url.password#" />

can also be written as

<cfinvoke component="/path/to/authQuery" method="getAuthSecure">
<cfinvokeargument name="lastName" value="#session.username#">
<cfinvokeargument name="pwd" value="#url.password#">
</cfinvoke>

Cup size   
Select size then click on coffee cup.
This entry was posted in Code, Coldfusion, Snippets. Bookmark the permalink.