How to use cfcase in cfswitch in ColdFusion

cfcase in cfswitch


<!DOCTYPE html>
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfcase tag example: how to use cfcase tag in cfswitch tag</title>

<h2 style="color:Crimson">cfcase Tag Example</h2>

<cfset Color="DarkBlue">
<b>Your Color:</b> #Color#
<br />

<cfswitch expression="#Color#">
 <cfcase value="Crimson">
  You choose color: Crimson[#DC143C]
 <cfcase value="DarkBlue">
  You choose color: DarkBlue[#00008B]
 <cfcase value="DarkRed">
  You choose color: DarkRed[#8B0000]
 <cfcase value="Lime">
  You choose color: Lime[#00FF00]
  You choose unknown color


More coldfusion examples