Server-side include directives insert the raw contents of a specified file anywhere within an ASP+ page.
<!-- #include pathtype = filename -->
File | The file name is a relative path from the directory containing the document with the #include directive. The included file can be in the same directory or in a subdirectory; it cannot be in a directory above the page with the #include directive. |
Virtual | The file name is a full virtual path from a virtual directory in your Web site. |
The included file is processed before any dynamic code is executed (much like a C pre-processor).
The #include tag must be enclosed within HTML/XML comment delimiters to avoid being interpreted as static text.
<html> <body> <!-- #Include file=”header.inc” --> Here is the main body of my file: <% For I=0 to 10 %> <!-- #Include virtual=”/Includes/Foobar.inc” --> <% Next %> <!-- #Include virtual=”footer.inc” --> </body> </html>
ASP+ Page Syntax