Skip to main content

Page Directive

Use a page directive to specify the page language for a CSP Page. ObjectScript is the default page language. The page directive must appear at the top of the CSP file. The following directive sets the page language to Caché Basic:


<%@Page Language="Basic" %>

The page language determines the language used for the following:

  1. Generated Code.

  2. CSP tags.

  3. Runtime Expressions — #(expr)# expressions.

  4. Scripts — the value of the language attribute must match the page language.

If the page language is ObjectScript:

  1. Methods can use either ObjectScript or Caché Basic. The script tag's attribute identifies the language.

  2. Compile time expressions, ##(<expr>)##, use ObjectScript.

  3. The CSP page can contain embedded SQL, embedded HTML, and embedded JavaScript.

If the page language is Caché Basic:

  1. Methods can use either ObjectScript or Caché Basic. The script tag's attribute identifies the language.

  2. Compile time expressions, ##(<expr>)##, still must use ObjectScript.

  3. The CSP page CANNOT contain embedded SQL, embedded HTML, or embedded JavaScript.

Note:

The examples in this tutorial use the default page language: ObjectScript. To learn more about ObjectScript, read Using Caché ObjectScript and the ObjectScript Tutorial. To learn more about Caché Basic, read Using Caché Basic and the Caché Basic Tutorial.

FeedbackOpens in a new tab