Classic ASP does not allow you to dynamically include files. All include
instructions happen first than IIS prosses all script commands. This means
that at the point in time when you try to include a file that your variable
myFileName does not have a value yet.
For more information check out:
-
http://www.learnasp.com/learn/includedynamic.asp
-
http://www.aspfaq.com/show.asp?id=2042
-
http://www.asp101.com/articles/micha...es/default.asp
-
http://www.codefixer.com/tutorials/dynamic_includes.asp
-
http://support.microsoft.com/default...b;en-us;192144
"Andrew Price" <andrew.price@fusionworkshop.com> wrote in message
news:XEKDe.9575$Fx3.9032@newsfe7-gui.ntli.net...[color=blue]
> This is not ASP.NET, but i am having a problem with old school ASP, what i
> need to do is
>
> <% myFileName="incfile.asp" %>
>
> <!--#include file="<% myFileName%>"-->
>
> However when i use this it comes back with the error
>
>
> Active Server Pages error 'ASP 0126'
>
> Include file not found
>
> /dev/andrewp/temp/test.asp, line 4
>
> The include file '<%myFileName%>' was not found.
>
>
>
> Anyone know how to fix it
>
> Thanks
>
> Andrew
>
>[/color]