Other tags, such as
between the beginning (<) character and the ending (>) character, as in the following example:
<cfset YourName="Bob">
Sometimes, although the tag can have a body, you do not need to put anything in it because the
attributes specify all the required information. You can omit the end tag and put a forward slash
character before the closing (>) character, as in the following example:
<cfexecute name="C:\winNT\System32\netstat.exe" arguments = "-e"
outputfile="C:\Temp\out.txt" timeout = "1" />
Note: The
cfset
tag encloses an assignment statement that assigns a value to a variable. The
function without assigning a value to a result variable.
Built-in tags
Over 80 built-in tags make up the heart of ColdFusion. These tags have many uses, including the
following:
•
Manipulating variables
•
Creating interactive forms
•
Accessing and manipulating databases
•
Displaying data
•
Controlling the flow of execution on the ColdFusion page
•
Handling errors
•
Processing ColdFusion pages
•
Managing the CFML application framework
•
Manipulating files and directories
•
Using external tools and objects, including Verity collections, COM, Java, and CORBA
objects, and executable programs
•
Using protocols, such as mail, http, ftp, and pop
Much of this document describes how to use these tags effectively. CFML Reference documents
each tag in detail.
Custom tags
ColdFusion lets you create custom tags. You can create two types of custom tags:
•
CFML custom tags that are ColdFusion pages
•
CFX tags that you write in a programing language such as Java or C++
Custom tags can encapsulate frequently used business logic or display code. These tags enable you
to place frequently used code in one place and call it from many places. Custom tags also let you
abstract complex logic into a single, simple interface. They provide an easy way to distribute your
code to others; you can even distribute encrypted versions of the tags to prevent access to the tag
logic.
Currently, over 1,000 custom tags are available on the Macromedia developer's exchange
(www.coldfusion.com/Developer/Gallery/index.cfm). They perform tasks ranging from checking
if Cookies and JavaScript are enabled on the client's browser to moving items from one list box to
another. Many of these tags are free and include source code.
and
, never have bodies; all the required information goes
cfset
cfftp
tag differs from other tags in that it has neither a body nor arguments. Instead, the
tag can also call a
cfset
Tags
41
Need help?
Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?
Questions and answers