Skip to main content
Previous sectionNext section

<CSP:ELSEIF>

Delimits an ELSEIF block.

Synopsis

<CSP:IF>...<CSP:ELSEIF CONDITION='%response.Data("TEST")=1'>...</CSP:IF>

Attributes

General Attributes

Attribute Description Value
CONDITION A runtime server-side expression to be evaluated. A server-side expression..

Description

The CSP:ELSEIF tag, placed within a CSP:IF block, specifies that the text between it and the end of the CSP:IF (or the next CSP:ELSEIF or CSP:ELSE) are displayed if the CSP:ELSEIF CONDITION evaluates to TRUE at runtime.

For example:

  <CSP:IF CONDITION=(name="Jack")>
    Hello, Jack!
  <CSP:ELSEIF CONDITION=(name="Jill")>
    Hello, Jill!
  <CSP:ELSE>
    Hello, someone who is not Jack or Jill!
  </CSP:IF>
Copy code to clipboard

Refer to the CSP:IF tag for more details.

Specifying Script Language

The CSP:ELSEIF tag will fire one of two rules depending on whether the language is set to cache or basic; these two rules are %ELSEIF and %ELSEIFBASIC.