I have an asp file that stores some values that are then used on an included template file. Like this:
dim mediaSrc()
ReDim mediaSrc(2)
mediaSrc(0) = "http://server.com/path/to/file.mp3"
mediaSrc(1) = "http://server.com/path/to/file.mp3"
mediaSrc(2) = "http://server.com/path/to/file.mp3"
<!--#include virtual="/path/to/include.asp" -->
I have a second asp file in which I want to include information from several of these first files. So I might have something like:
dim fileSrc()
ReDim fileSrc(2)
fileSrc(0) = "http://server.com/path/to/firstfile.asp"
fileSrc(1) = "http://server.com/path/to/secondfile.asp"
fileSrc(2) = "http://server.com/path/to/finalfile.asp"
Can I, in that second asp file, get a reference to the variables set in the first asp files?
I’d like to do something like:
fileSrc(0).mediaSrc(0)
to get the URL specified in the first asp file.
You’d need to load the page using the filesystem as a text stream, then parse the page text yourself. Classic ASP pages are not objects, so
fileSrc(0).mediaSrc(0)will not work.