The Polite Web Server, at 21:15:35 on 20/05/2012

Note: the time shown is that on the server, which is situated on the East coast of the U.S.

Hi there, and welcome to our site.


This page contains embedded ASP VBScript lines. The example was taken from the Wrox book

Beginning ASP 2.0 by Francis, Kauffman, Llibre, Sussman and Ullman. ISBN 1-861001-34-7

It displays subsets of the above text depending on the time, under the control of VBScript code.

For the VBScript parts to run, the server has to support ASP. It must run either IIS (Internet Information Server) or PWS (Personal Web Server). I run PWS on my local machine to test the ASP programs out, and then upload them onto the 'real' server, run by Tollon.

The VBScript is interpreted by IIS or PWS.

Here's the code for this simple program:

The script starts with the usual HTML header tags

VBScript is surrounded by <% and %>

This is what the VBScript does: If it's before 8am display the message about bed.

Otherwise generate a random integer from 0 to 3 and use it to select and display one of four messages.

Note that VBScrip is very similar to VB.

It fits in an HTML page to conditionally determine what text will be displayed.