• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 32. Writing Active Server Pages > Testing Conditions in VBScript

Testing Conditions in VBScript

VBScript provides one control structure for making decisions—the If...Then...Else structure. To make a decision, you supply one or more expressions that evaluate to True or False. Which code is executed depends on what your expressions evaluate to.

The simplest form of If...Then...Else uses only the If...Then part. If the specified condition is true, the code following the condition is executed; if not, that code is skipped. In the following code fragment, for example, the message appears only if the variable x is less than pi:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint