Project I: A Simple Date Script

This script lets you add a date to a page with only three lines of code. We'll go into a lot of detail about how it works in order to expose basic ASP concepts that will be used time and again in this chapter and those that follow.

Note that the price we pay for simplicity is lack of functionality: The date that this script spits out probably isn't formatted exactly the way you'd like, which is where the next script, which produces a fancy date (hold on to your hats…) picks up next.

New Features

<% … %> (The ASP Tag)

Any code enclosed in ASP tags will be executed on the server. Furthermore, this code will be removed from the page after it is executed.

For example, the "=" is equivalent to "print" in many languages ...

Get Essential ASP for Web Professionals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.