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

Part 3: Week 3 At a Glance > CFSWITCH/CFCASE/CFDEFAULTCASE

CFSWITCH/CFCASE/CFDEFAULTCASE

Used with CFCASE and CFDEFAULTCASE, the CFSWITCH tag evaluates a passed expression and passes control to the CFCASE tag that matches the expression result. You can optionally code a CFDEFAULTCASE tag, which receives control if there is no matching CFCASE tag value.

Syntax

<CFSWITCH EXPRESSION="expression">
    <CFCASE VALUE="value" DELIMITERS="delimiters">
     HTML and CFML tags
    </CFCASE>
    additional <CFCASE></CFCASE> tags
    <CFDEFAULTCASE>
     HTML and CFML tags
    </CFDEFAULTCASE>
</CFSWITCH>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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