470,855 Members | 1,208 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

Include file

Hi,

Is there any way of having an include file as a string, eg:

<!--#include file="<%=strURL%>"-->

This doesn't seem to work, I get an error:

The include file '<%=strURL%>' was not found

Is my syntax wrong or isn't this possible?

Cheers.
Jul 19 '05 #1
4 2010
Miguel Orrego wrote on 15 jul 2003 in
microsoft.public.inetserver.asp.general:
Is there any way of having an include file as a string, eg:

<!--#include file="<%=strURL%>"-->


No, the include is executed before the asp-parsing,
so that asp contents of the include get parsed too.

Try server.execute

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
Try google - ther are hundreds of hits for using Server.Execute.
http://www.microsoft.com/windows2000...p/vbob9pid.htm

Chris.

"Miguel Orrego" <mi****@stressedmonkey.net-nospam> wrote in message
news:3f***********************@news.dial.pipex.com ...
Thanks, could you show me some example code using server.execute ?

Cheers.

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Miguel Orrego wrote on 15 jul 2003 in
microsoft.public.inetserver.asp.general:
Is there any way of having an include file as a string, eg:

<!--#include file="<%=strURL%>"-->


No, the include is executed before the asp-parsing,
so that asp contents of the include get parsed too.

Try server.execute

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Jul 19 '05 #3
Sorry, I'm lying, the images were in the same folder as the page I was
calling.

I've now put copies of those images into the same folder as the page I'm
calling from and that seems to have fixed it.

Strange though that it wouldn't work with the images left as they are.

Cheers.

"Miguel Orrego" <mi****@stressedmonkey.net-nospam> wrote in message
news:3f***********************@news.dial.pipex.com ...
Great, that seems to have acheived what I want, but only halfway.

When calling a file that has images, the images don't show, just get the
usual box with a cross as you would get when the image file is not found.
The images are there, but the path to them from the called document would be ../images/image1.jpg etc. Would this have an impact? Should the images be in the same folder as the called document? Is there a way around this?

Cheers.

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Miguel Orrego wrote on 15 jul 2003 in
microsoft.public.inetserver.asp.general:
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
> Miguel Orrego wrote on 15 jul 2003 in
> microsoft.public.inetserver.asp.general:
> > Is there any way of having an include file as a string, eg:
> >
> > <!--#include file="<%=strURL%>"-->
> >
>
> No, the include is executed before the asp-parsing,
> so that asp contents of the include get parsed too.
>
> Try server.execute
Thanks, could you show me some example code using server.execute ?


<%
myurl = "/myfile.asp"
server.execute myurl
%>

not tested

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Jul 19 '05 #4
Miguel Orrego wrote on 15 jul 2003 in
microsoft.public.inetserver.asp.general:
Sorry, I'm lying, the images were in the same folder as the page I was
calling.

I've now put copies of those images into the same folder as the page I'm
calling from and that seems to have fixed it.

Strange though that it wouldn't work with the images left as they are.


[please interpost and topquote]

No, not strange, the relative path probably changes to the calling page
with response execute.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by wukexin | last post: by
28 posts views Thread by Ramesh | last post: by
60 posts views Thread by Derrick Coetzee | last post: by
9 posts views Thread by bill | last post: by
12 posts views Thread by Francois Grieu | last post: by
9 posts views Thread by zolli | last post: by
5 posts views Thread by David Mathog | last post: by
6 posts views Thread by tshad | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.