Table of Contents
Preface ....................................................................................................... xi
Part I: Introduction to Active Server Pages
Chapter 1—Active Server Pages: An Introduction .................... 3
The Static Internet .................................................................................. 3
The Dynamic Internet Part I: CGI Applications .................................... 3
The Dynamic Internet Part II: ISAPI ...................................................... 4
Active Server Pages and Active Server Pages 2.0 ................................. 6
ASP: A Demonstration ............................................................................ 6
The ASP Object Model ........................................................................... 9
Chapter 2—Active Server Pages: Server-Side Scripting ......... 12
Client-Side Scripting ............................................................................. 12
Server-Side Scripting ............................................................................. 15
ASP Functions ....................................................................................... 19
Scripting Languages .............................................................................. 22
Chapter 3—Extending Active Server Pages ............................... 23
Part II: Object Reference
Chapter 4—Application Object ...................................................... 27
Comments/Troubleshooting ................................................................ 28
Collections Reference ........................................................................... 30
Methods Reference ............................................................................... 36
Events Reference .................................................................................. 38
Chapter 5—ObjectContext Object ................................................. 41
Comments/Troubleshooting ................................................................ 42
Methods Reference ............................................................................... 43
Events Reference .................................................................................. 45
Chapter 6—Request Object ............................................................. 48
How HTTP Works ................................................................................ 48
The ASP Request Object ...................................................................... 57
Comments/Troubleshooting ................................................................ 57
Properties Reference ............................................................................ 58
Collections Reference ........................................................................... 59
Methods Reference ............................................................................... 82
Chapter 7—Response Object .......................................................... 85
Comments/Troubleshooting ................................................................ 86
Properties Reference ............................................................................ 87
Collections Reference ........................................................................... 99
Methods Reference ............................................................................. 104
Chapter 8—Server Object .............................................................. 114
Comments/Troubleshooting .............................................................. 115
Properties Reference .......................................................................... 115
Methods Reference ............................................................................. 116
Chapter 9—Session Object ............................................................ 122
Comments/Troubleshooting .............................................................. 123
Properties Reference .......................................................................... 125
Collections Reference ......................................................................... 129
Methods Reference ............................................................................. 136
Events Reference ................................................................................ 138
Chapter 10—Preprocessing Directives, Server-Side Includes,
and GLOBAL.ASA
....................................................................... 141
Preprocessing Directives .................................................................... 141
Preprocessing Directives Reference .................................................. 142
Server-Side Includes ........................................................................... 146
#include .............................................................................................. 147
GLOBAL.ASA ...................................................................................... 150
GLOBAL.ASA Reference ..................................................................... 151
Part III: Installable Component Reference
Chapter 11—ActiveX Data Objects 1.5 .................................... 159
Accessory Files/Required DLL Files ................................................... 161
Instantiating Active Data Objects ....................................................... 161
Comments/Troubleshooting .............................................................. 163
Object Model ...................................................................................... 163
Properties Reference .......................................................................... 174
Collections Reference ......................................................................... 206
Methods Reference ............................................................................. 207
Chapter 12—Ad Rotator Component ....................................... 236
Accessory Files/Required DLL Files ................................................... 237
Instantiating the Ad Rotator ............................................................... 240
Comments/Troubleshooting .............................................................. 240
Properties Reference .......................................................................... 241
Methods Reference ............................................................................. 243
Ad Rotator Example ........................................................................... 244
Chapter 13—Browser Capabilities Component .................... 248
Accessory Files/Required DLL Files ................................................... 249
Instantiating the Browser Capabilities Component .......................... 253
Comments/Troubleshooting .............................................................. 253
Properties Reference .......................................................................... 254
Chapter 14—Collaboration Data Objects for
Windows NT Server
................................................................... 256
Accessory Files/Required DLL Files ................................................... 257
Instantiating Collaboration Data Objects ........................................... 257
Comments/Troubleshooting .............................................................. 258
The CDO Object Model ..................................................................... 259
NewMail Object Properties Reference ............................................... 268
Methods Reference ............................................................................. 280
Chapter 15—Content Linking Component ............................ 286
Accessory Files/Required DLL Files ................................................... 287
Instantiating a Content Linking Object .............................................. 288
Comments/Troubleshooting .............................................................. 289
Methods Reference ............................................................................. 290
Content Linking Component Example .............................................. 299
Chapter 16—Content Rotator Component ............................. 303
Accessory Files/Required DLL Files ................................................... 304
Instantiating the Content Rotator Component .................................. 306
Comments/Troubleshooting .............................................................. 306
Methods Reference ............................................................................. 306
Chapter 17—Counters Component ........................................... 309
Accessory Files/Required DLL Files ................................................... 310
Instantiating the Counters Component ............................................. 310
Comments/Troubleshooting .............................................................. 311
Methods Reference ............................................................................. 312
Chapter 18—File Access Component ........................................ 316
Accessory Files/Required DLL Files ................................................... 316
Instantiating Installable Components ................................................ 316
Comments/Troubleshooting .............................................................. 317
Object Model ...................................................................................... 317
Properties Reference .......................................................................... 324
Methods Reference ............................................................................. 334
Chapter 19—MyInfo Component ............................................... 346
Accessory Files/Required DLL Files ................................................... 346
Comments/Troubleshooting .............................................................. 349
Properties Reference .......................................................................... 350
Chapter 20—Page Counter Component .................................. 354
Accessory Files/Required DLL Files ................................................... 355
Instantiating the Page Counter Component ...................................... 355
Comments/Troubleshooting .............................................................. 356
Methods Reference ............................................................................. 356
Chapter 21—Permission Checker Component ...................... 358
Accessory Files/Required DLL Files ................................................... 359
Instantiating the Permission Checker ................................................ 359
Comments/Troubleshooting .............................................................. 360
Methods Reference ............................................................................. 360
Part IV: Appendixes
Appendix A—Converting CGI/WinCGI Applications into
ASP Applications
....................................................................... 365
Appendix B—ASP on Alternative Platforms .......................... 377
Appendix C—Configuration of ASP Applications on IIS ... 382
Index ...................................................................................................... 389