Jump to content

[ASP] Include from variable


Recommended Posts

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, subThis
thisPage = "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 34

The include file 'content/' was not found.

Link to comment
Share on other sites


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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...