RSS Feed Link       View page in German   View page in Spanish   View page in French   View page in Italian   View page in Portuguese   View page in Japanese   View page in Korean   View page in Simplified Chinese   
Log On   Feedback   Search Site    
 
 
Home eZine Software Scripting Network Admin. SITE UPGRADE IN PROGRESS - CLICK HERE FOR INFO 
 
Preprocessing Directives
Languages   UDF/UDC Libraries   Data Access   Visual Studio    

 

Select Area:

Information
ADSI
ASP
AutoIt
(D)HTML
KiXtart
MS-DOS / CMD
PowerShell
RunDLL32
ScriptIt
VBScript
WMI

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:

Return to the Main Menu


CODEPAGE

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

Return to Top

ENABLESESSIONSTATE

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

Return to Top

LANGUAGE

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

Return to Top

LCID

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

Return to Top

TRANSACTION

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

Return to Top



 
Good Morning
8/20/2008 10:45:31 AM
Copyright © 1997 - 2008 Dx21, LLC. All rights reserved.
Dx21, LLC a Washington Limited Liability Company
  Privacy Policy | Terms of Use
   
Labelled with ICRA   Rated with SafeSurf