Preprocessing Directives

Active Server Pages provides preprocessing directives similar to the compiler directives in C and similar languages. Like these precompilation directives, ASP directives instruct the web server to perform a function before the script is completed and sent to the client. The web server performs the other directives before interpreting the script itself. ASP directives, with the exception of <%= expression %>, must appear on the first line of a script and cannot be included using a Server-Side Included file. The format for these directives (with the aforementioned exception of the <%= expression %> directive) is the following:

               <%@ DIRECTIVE=Value%>

where DIRECTIVE is one of the ASP directives listed in this section and Value is a valid value for the directive. Note that you must include a space between the @ character and the directive. Also note that the preprocessing directive must be placed within <%...%> delimiters.

The valid ASP preprocessing directives are listed as follows and are explained in depth later in this chapter:

CODEPAGE
ENABLESESSIONSTATE
LANGUAGE
LCID
TRANSACTION

Get ASP in a Nutshell, 2nd Edition 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.