• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Step 2. Using Variables > Setting Values

Setting Values

In ColdFusion, you create variables by giving them a name and assigning them a value. In this step, we will concentrate on the most commonly used ways to assign a value to a variable.

Using <CFSET>

As we have already seen, the <CFSET> tag can be used to assign a value to a variable. The <CFSET> tag is quick and easy to use and has no attributes other than the variable name and its assigned value. For example, the line of code


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint