If / ElseIf / Else
Try it yourself →Executes code based on a condition.
Syntax
If condition Then ... ElseIf ... Else ... End If
Description
Opened with Then, closed with End If. Equality is =, not equal is <>.
Example
<% Dim score : score = 75 If score >= 50 Then Response.Write "Passed" Else Response.Write "Failed" End If %>
Expected output
Passed
When to use?
Flow branching.