473,385 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2098
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: mescaline | last post by:
Hi, Suppose a_file.cpp contains a function a_function() Now to include it in main_file.cpp I just do #include "a_file.cpp" and I'm all set. i recently came across this seemingly roundabout...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
28
by: Ramesh | last post by:
Hi, I am currently maintaining a legacy code with a very very large code base. I am facing problems with C/C++ files having a lot of un-necessary #includes. On an average every C/C++ file has...
60
by: Derrick Coetzee | last post by:
It seems like, in every C source file I've ever seen, there has been a very definite include order, as follows: - include system headers - include application headers - include the header...
9
by: bill | last post by:
Forget the exact definition of difference between, #include <foo.h> and #include "bar.h" Normally foo.h is a standard header file, so it's path is not defined in compiler option, but I...
12
by: Francois Grieu | last post by:
Can #include safely use a preprocessing token, as in #define HEADERFILE "stdio.h" #include HEADERFILE int main(void) {return printf("Hello, world\n")*0;} TIA, François Grieu
9
by: zolli | last post by:
Hi, I've been banging my head against this for a while now. Hoping someone here can shed some light on what's going on. On including stdlib.h in a file, I'm seeing the following errors: ...
5
by: David Mathog | last post by:
One thing that can make porting C code from one platform to another miserable is #include. In particular, the need to either place the path to an included file within the #include statement or to...
3
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include...
6
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.