ASP
IN A NUTSHELL
A Desktop Quick Reference
ASP
IN A NUTSHELL
A Desktop Quick Reference
A. Keyton Weissinger
Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo
ASP in a Nutshell: A Desktop Quick Reference
by A. Keyton Weissinger
Copyright © 1999 O’Reilly & Associates, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly & Associates, Inc., 101 Morris Street, Sebastopol, CA 95472.
Editor: Ron Petrusha
Production Editor: Clairemarie Fisher O’Leary
Printing History:
February 1999:
First Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are
registered trademarks of O’Reilly & Associates, Inc. The association of the image of
an asp and the topic of Active Server Pages is a trademark of O’Reilly & Associates,
Inc.
Many of the designations used by manufacturers and sellers to distinguish their
products are claimed as trademarks. Where those designations appear in this book,
and O’Reilly & Associates, Inc. was aware of a trademark claim, the designations
have been printed in caps or initial caps. ActiveX, JScript, Microsoft, Microsoft
Internet Explorer, Visual Basic, Visual C++, Windows, and Windows NT are
registered trademarks of Microsoft Corporation.
While every precaution has been taken in the preparation of this book, the publisher
assumes no responsibility for errors or omissions, or for damages resulting from the
use of the information contained herein.
ISBN: 1-56592-490-8
[M]
[1/00]
Table of Contents
Preface ....................................................................................................... xi
Part I: Introduction to Active Server Pages
Chapter 1—Active Server Pages: An Introduction .................... 3
The Static Internet ..................................................................................
The Dynamic Internet Part I: CGI Applications ....................................
The Dynamic Internet Part II: ISAPI ......................................................
Active Server Pages and Active Server Pages 2.0 .................................
ASP: A Demonstration ............................................................................
The ASP Object Model ...........................................................................
3
3
4
6
6
9
Chapter 2—Active Server Pages: Server-Side Scripting ......... 12
Client-Side Scripting .............................................................................
Server-Side Scripting .............................................................................
ASP Functions .......................................................................................
Scripting Languages ..............................................................................
12
15
19
22
Chapter 3—Extending Active Server Pages ............................... 23
Part II: Object Reference
Chapter 4—Application Object ...................................................... 27
Comments/Troubleshooting ................................................................ 28
v
ASP in a Nutshell: A Desktop Quick Reference, eMatter Edition
Copyright © 2000 O’Reilly & Associates, Inc. All rights reserved.
About the Author
Keyton Weissinger is a technical manager with USWeb/CKS in Atlanta, Georgia.
Before that, he worked for Arthur Andersen as the senior engineer for the Business
Consulting KnowledgeSpace.
Colophon
The animal appearing on the cover of ASP in a Nutshell is an asp, which is a term
applied to various venomous snakes, including the depicted asp viper (Vipera aspis)
of Europe as well as the Egyptian cobra (Naja haje), thought to have been the means
of Cleopatra’s suicide.
Needing to eat at least 5–6% of their body weight in food per week, European asp
vipers hunt by lying in wait for approaching prey. After grabbing and biting a small
rodent or other prey, they release it and wait several minutes for it to stop moving;
the generally sluggish viper rarely chases prey. Vipers know their home territory very
well, which allows quick escape from their asp-kicking natural enemies, serpent
eagles and hedgehogs. This trick hasn’t helped them escape from their greatest
threat, the expansion of human civilization, which frequently wipes out large sections of their territory.
The chemical composition of asp viper venom can vary from one population to the
next, hampering initial antivenin development until 1896, but few viper bite fatalities
occur in Europe today.
Clairemarie Fisher O’Leary was the production editor for ASP in a Nutshell. Sheryl
Avruch was the production manager; Jeff Liggett, Norma Emory, and John Files provided production support and quality assurance. Mike Sierra provided tools support.
Seth Maislin wrote the index.
Edie Freedman designed the cover of this book using a 19th-century engraving from
the Dover Pictorial Archive. The cover layout was produced with QuarkXPress 3.32
using the ITC Garamond font.
The inside layout was designed by Nancy Priest and implemented in FrameMaker
by Mike Sierra. The text and heading fonts are ITC Garamond Light and Garamond
Book. The illustrations that appear in the book were created in Macromedia Freehand 7.0 and screen shots were created in Adobe Photoshop 4.0 by Robert Romano
or Rhon Porter. This colophon was written by Nancy Kotary.
The production editors for ASP in a Nutshell: A Desktop Quick Reference, eMatter Edition were Ellie Cutler and Jeff Liggett. Linda Walsh was the product manager.
Kathleen Wilson provided design support. Lenny Muellner, Mike Sierra, Erik Ray,
and Benn Salter provided technical support. This eMatter Edition was produced with
FrameMaker 5.5.6.