<% If Request("DontFrame")<>1 Then Response.Redirect "/iissamples/sdk/asp/docs/SampFram.asp?ovfile=/iishelp/iis/htm/sdk/samp5l9v.asp&srcfile=Simple/Conditional" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
Conditional operators, together with variables and looping constructs, form the fundamental building blocks of programming languages and, therefore, applications. The Web-based applications you implement with ASP scripts can take advantage of the flow control provided by conditional operators and the interactivity and sophistication of HTML. </p>
<p>
This sample demonstrates the <b>If ... Then</b>, or <b>if ... else</b> statements in both VBScript and JScript, as well as the more complicated <b>Select ... Case</b> and <b>switch ... case</b> statements. Each statement demonstration basically accomplishes the same thing, sending a message to the client browser that consists of the current time and date, and a greeting message that depends on whether the system clock reads <small>A.M.</small> or <small>P.M.</small> </p>