...
The if statement is helpful when you only want text to appear under specific conditions
Info |
---|
<% indicates begin JavaScript and %> indicates end JavaScript |
<% if (#VariableCode == 0) %>Text %>Text if true <% |\ else %>Text %>Text if false <% |\%>
An alternate way of writing the same code is to keep the entire statement in JavaScript
<% if (#VariableCode==0) Output.Write("Text if true");
else Output.Write("Text if false"):
%>
You can also reference other variable values within the if statement
...