[thelist] 1st line of ASP Scripts (option explicit/onerror/transaction)

Chris Blessing webguy at mail.rit.edu
Fri Jul 26 20:14:01 CDT 2002

Also, you cannot write headers to the client (i.e. response.cookies,
response.contenttype, etc.) after you write anything to the client, UNLESS
you turn on buffering (response.buffer = true; this must also come before
anything gets written to the client, and cannot be turned off once it's
turned on earlier in the same script).

Chris Blessing
webguy at mail.rit.edu

> Well, as for facts:
> Option Explicit is a compile-time instruction, so it must come first. Try
> not putting it first, you'll get an exception.
> All the rest should come when it makes sense in your code. Don't
> set headers
> until you're ready to set headers. Dim your variables in some
> logical manner
> (for long scripts, I like to dim everything at the top so I don't reuse
> variable names).
> Wade

More information about the thelist mailing list