• supports both HTML and ASP in the same page.
• handles standard include files.
• encapsulated into class for speed and robustness.
I, as like most ASP developers have wanted the
ability to dynamically include script files. If dynamic includes were possible
we would be able to increase performance if existing code, add files based upon
a variable value and even change the structure of page creation. The
possibilities are enormous.
The function is actually very simple. It reads
the passed file using the filesystem object. Then it removes the surrounding ASP
delimiters "<% ... %>". This allows us to re-use existing files. The files
contents are then passed through the vbscript method "ExecuteGlobal". This will
stick the content into the current process and give us access to it. Below is an
example of how to include a file.
output "procedure test"
This class will not support vbscript statements like "Option Explicit" or "<%@ ... %>".
I really hope that you find this as useful as I
have. I would appreciate any comments or suggestions for future
version to increase performance and robustness. I would also appreciate you
Stay tuned for version 3. Implementing an entire website from a database.