Article ID: 192144 - Last Review: July 1, 2004 - Revision: 4.3 How To Dynamically Include Files in Active Server PagesThis article was previously published under Q192144 SUMMARY
Since Active Server Pages (ASP) pages are compiled and executed before
being sent to the client (as static HTML), trying to use a variable in
place of a file name in a Server Side Include (<!-- #include PathType =
FileName -->) fails. To include a file in your ASP page, you could include
code similar to the following that reads in a file and displays it.
MORE INFORMATIONThe dynamically included file may contain any client-side code you wish, including HTML and JavaScript. However, ASP will NOT process server-side script in the file. This is because all the ASP code has already run when it includes the file and the server will not go back to read anything for server-side processing again. REFERENCES
For additional information, please see the following article in the
Microsoft Knowledge Base:
172024
(http://support.microsoft.com/kb/172024/EN-US/
)
INFO: Server Side Include Directives Not Processed by ASP
APPLIES TO
| Article Translations
|
Back to the top
