Tripredacus Posted January 15, 2010 Posted January 15, 2010 I'm playing around with ASP and making a website. Mind you, the only programs I am using is Scite and MSPaint. Scite doesn't even color code for web files either.Anyways, I am trying to use a method I've done in PHP before, but I still do not know ASP (or VBS) well enough to figure out how to do some of the things I'm attempting. Here is the gist: I declare a variable, then want to do an include that has a file name that is the same as the variable. <% Dim thisPage, subThisthisPage = "index"subThis = "index"%><!--#include file="content/" & subThis & ".asp"-->Can I even concat into an include like this? Or am I just using the wrong operators or quotes or what?edit: here is the response from the browser:Active Server Pages error 'ASP 0126'Include file not found/skylynx/xhtmlSite/index.asp, line 34The include file 'content/' was not found.
cluberti Posted January 17, 2010 Posted January 17, 2010 You have to remember that included files are processed and inserted before the scripts are executed, meaning that won't work. That KB gives a good workaround, though.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now