I mean, like php'h include…
something like
my_file_to_be_included = "include_me.asp" -- >
for what I've seen so far, there are a couple of alternatives, but every one of them has some sort of shortcoming…
what I'm trying to figure out is how to make a flexible template system… without having to statically include the whole thing in a single file with a loooooong case statement…
here there are a couple of links
a solution using FileSysmemObject, just lets you include static pages
this approach uses Server.Execute
but it has some shortcomings I'd like to avoid… seems like (haven't tried yet) Server.Execute code runs in another context, so you can't use it to load a functions your are planning to use in the caller code… nasty…
I'm not sure about it (couldn't test it yet) but it seems like this one dinamycally handles the page to a SSDI component…
any idea???
Best Answer
No you can't do a dyanmic include, period.
Your best shot at this is a server.execute and passing whatever state it needs via a Session variable:-