<% If Request("DontFrame")<>1 Then Response.Redirect "/iissamples/sdk/asp/docs/SampFram.asp?ovfile=/iishelp/iis/htm/sdk/samp5l9v.asp&srcfile=Simple/Conditional" %> Conditional Operators

Conditional Operators

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.

This sample demonstrates the If ... Then, or if ... else statements in both VBScript and JScript, as well as the more complicated Select ... Case and switch ... case 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 A.M. or P.M.


© 1997 by Microsoft Corporation. All rights reserved.