APGen Documentation Previous Topic: Passing Data to APG Scripts Next Topic: File Permissions in ASP Parent Topic: Programmatic Execution    Programmatic Execution
Executing APG Scripts in Active Server Pages
See Also:

APG Scripts can be run in Active Server Pages.  This is useful in many situations:

For an example, see <install dir>\Examples\awe_apg\build.asp.  This page provides a web-based rebuild of the web site, by running all the APG scripts in the application.

For a more advanced example, see <install dir>\Examples\DiscussionBoard\post.asp.  The Message_UpdateBuild() function runs two APG scripts when a user adds a new post to the discussion board.

The syntax for running APG scripts in Active Server Page is the same as for other programmatic execution.  Here is a simple ASP code snippet for executing an APG script in an ASP page:

<%

Dim oAPGen
Set oAPGen = Server.CreateObject("APGen")

oAPGen.Run Server.MapPath("script.apg")

%>

Though this code is simple, there are few important topics relevant to executing APG scripts in real-world ASP applications: