Include directives are processed BEFORE any other server-side code and
because of this, you can't do what you are trying because the variable
"contentIncludeFile" hasn't been resolved yet.
This is not a .NET issue/question. It is how the server-side INCLUDE
directive is handled by the server.
Why not ditch "Response.Write" statements as well as INCLUDE directives and
start using .NET techniques such as labels (instead of response.write) and
User Controls (instead of SSI's)?
"darrel" <no*****@hotmail.com> wrote in message
news:OM**************@tk2msftngp13.phx.gbl...
I'm trying to load an include dynamically. So, I'm writing out the include
tag via a response.write:
response.write("<!--#include virtual='" & contentIncludeFile &"' -->")
however, that's writing out the include tag AFTER the page is processed,
obviously. Any suggestions for a way around this? Should I instead load
the
contents of the include file as a string and then write that out?
-Darrel