Select Area:
| Preprocessing Directives
Preprocessing Directives (PD) are instructions given to the web server by the
ASP page which instruct the web server to perform function before the ASP page
is rendered.
The syntax for PD is as follows:
| Single Directive:  |
<%@ DIRECTIVE=Value
%> |
| Multiple Directives:  |
<%@ DIRECTIVE1=Value
DIRECTIVE2=Value [...] %> |
The following are rules for specifying PD:
- The PD must be the first line on the ASP page
- The PD must be placed within the <%@ ... %> delimiters.
- There must be a space between the @ and the first directive.
- There can not be any spaces surrounding the equals sign (=).
- There must be a space between directives (if multiple directives are
specified)
The following are valid directives for PD:

| Syntax: |
CODEPAGE=intCodePage |
| Where: |
intCodePage
Integer value representing a valid code page for the Web server.
Codes can be found on Microsoft's MSDN site.
|
| Example: |
<%@ CODEPAGE=949 %> |
| Notes: |
The directive can be used in conjunction with the Session.CodePage property to set the server to one codepage, and
the client to another. |
| More Info: |
Microsoft Platform SDK
|

| Syntax: |
ENABLESESSIONSTATE=bState |
| Where: |
bState
Boolean value (True/False) indicating the appropriate state.
|
| Example: |
<%@ ENABLESESSIONSTATE=True %> |
| Notes: |
Enabled / Disabled the storage of Session content (Session object variables and objects).
|
| More Info: |
Microsoft Platform SDK
|

| Syntax: |
LANGUAGE=ScriptLanguage |
| Where: |
ScriptLanguage
The scripting engine to use to process the page. The default is VBScript.
|
| Example: |
<%@ LANGUAGE=VBScript %> |
| Notes: |
Languages included with IIS
are VBScript and JScript. Other valid languages, but which must be installed on the IIS server prior to use,
are PerlScript, Python and REXX.
|
| More Info: |
Microsoft Platform SDK
|

| Syntax: |
LCID=localeidentifier |
| Where: |
localeidentifier
A valid locale identifier.
|
| Example: |
<%@ LCID=1049 %> |
| Notes: |
A DWord value used to identify the locale settings for the server and the client.
Codes can be found on Microsoft's MSDN site.
|
| More Info: |
Microsoft Platform SDK
|

| Syntax: |
TRANSACTION=Value |
| Where: |
Value
One of the following:
- Required
Always initiates a new transaction.
- Requires_New
Always participates in a transaction and initiates a transaction, if one does not currently exist.
- Supported
Participates in a transaction if one exists but does not require a transaction.
- Not_Supported
Never participates in a transaction. If called from a script that is using transactions, the script containing the @TRANSACTION processing directive still runs but outside of the context of the
transaction.
|
| Example: |
<%@ TRANSACTION=Requires_New %> |
| Notes: |
The Value is not a string, so do not enclose it in quotes. This directive will cause the IIS server to utilize the
Microsoft Transaction Server to ensure that the entire script is process before any data is actually saved. That way, on
a failure, no data is lost or updated. Currently, this only works for database related actions.
|
| More Info: |
Microsoft Platform SDK
|


|