APGen Documentation Previous Topic: Replication Next Topic: APG Script Brackets Parent Topic: Active Page Generator Documentation    Active Page Generator Documentation
APG Script Syntax Reference
See Also:

To write APG scripts, developers must be familiar with:

APG Script Tags

The following tags are parsed and handled by APGen when found in APG scripts:

Syntax
Description
<%# ... #%> APG Script Brackets
Surrounds a script block.
<SCRIPT RUNAT=APGen [LANGUAGE=<lang>]>
... </SCRIPT>
SCRIPT Tag
Surrounds a script block.
<%# =<expression> #%> APG Output Expression
Writes a script expression to the Output object.
<!-- #include apg=<filepath> --> Include Directive
Inserts a file in the APG script.
<%# @LANGUAGE=<lang> #%> @LANGUAGE Directive
Sets the default script language for the APG script.

All text outside of these tags is treated as content, and therefore is written to the Output stream.

Note that these tags are systematically similar to HTML and ASP tags.  This was done for consistency, ease of porting to/from ASP, and so that syntax highlighting can be used within popular editors.