Tripredacus Posted January 15, 2010 Share 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. Link to comment Share on other sites More sharing options...
cluberti Posted January 17, 2010 Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now