473,486 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

variable in include file

Hi,
It is possible to add variable into the include file.

<!--#include file="../info/<%=strfoldername%>/notetosomeone.asp"-->

strfoldername is from my database.
It doesn't work.
Anyone knows how to solve this problem.
Or has other way to do it.
Thanks,
Frank

Jul 19 '05 #1
4 1593
Includes are processed prior to any code. Read here.

http://www.aspfaq.com/show.asp?id=2042

Ray at work

"Frank" <mf****@hotmaill.com> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
Hi,
It is possible to add variable into the include file.

<!--#include file="../info/<%=strfoldername%>/notetosomeone.asp"-->

strfoldername is from my database.
It doesn't work.
Anyone knows how to solve this problem.
Or has other way to do it.
Thanks,
Frank

Jul 19 '05 #2
no

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Frank" <mf****@hotmaill.com> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
Hi,
It is possible to add variable into the include file.

<!--#include file="../info/<%=strfoldername%>/notetosomeone.asp"-->

strfoldername is from my database.
It doesn't work.
Anyone knows how to solve this problem.
Or has other way to do it.
Thanks,
Frank

Jul 19 '05 #3
Include files are 'Included' before the page is
processed. With this in mind, you can not use a variable
to define the location of the include file as that
variable does not exist when the server is doing its
initial run-through of code.

You may be able to use server.transfer or server.execute
as an option.
-----Original Message-----
Hi,
It is possible to add variable into the include file.

<!--#include file="../info/<%=strfoldername%
/notetosomeone.asp"-->

strfoldername is from my database.
It doesn't work.
Anyone knows how to solve this problem.
Or has other way to do it.
Thanks,
Frank

.

Jul 19 '05 #4
No, you can't do this.
http://www.aspfaq.com/2042

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Frank" <mf****@hotmaill.com> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
Hi,
It is possible to add variable into the include file.

<!--#include file="../info/<%=strfoldername%>/notetosomeone.asp"-->

strfoldername is from my database.
It doesn't work.
Anyone knows how to solve this problem.
Or has other way to do it.
Thanks,
Frank

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2545
by: Dennis M. Straussfogel | last post by:
I'm trying to implement a nested SSI file that has in it the line: <!--#include virtual="<!--#echo var='VAR_location'-->pagelinks.txt" --> where VAR_location is a variable set in the "calling"...
2
13508
by: Eric | last post by:
Hi, I've a problem with trying to retrieve a session variable in an include file. Basically, the main asp creates a session variable: <% Session("var1") = "Hello" %> And then when I click...
2
1454
by: mark | last post by:
How does one call a variable defined in a class defined in file1.cpp from another file file2.cpp. Or can one call a class from a different file ? (Besides the standard way to define the variable...
3
7632
by: Mike | last post by:
I'm new to PHP - moving over from ASP. I have a number of include files, the first of which sets the value of a variable $loginmsg. I use that variable in a subsequent include file, but get a...
8
3490
by: chellappa | last post by:
hi Everybody ! decalaring variable in a.h and using that vaaariable in a1.c and inalization is in main.c it is possible .........pleaase correct that error is it Possible? i am trying it...
4
2697
by: spectre | last post by:
Hello, I first create a session variable 'client' in the login.asp file The login.asp file opens a file (xxx.asp) with an include file .. If I write <!--#include file="../../../data/" &...
13
1817
by: GGawaran | last post by:
First off, Hi everyone new to .asp and am trying to self teach myself. Im trying to figure out what exactly im doing wrong, or maybe what I think I can do, I really cant. The Idea....
6
4172
by: j.woodcock | last post by:
is there a way of having a file that's name is a variable (eg dependant on the user name) act like a include. i know that you cant define the file for an include asp tag using a variable and that...
3
1816
by: leonardodiserpierodavinci | last post by:
Hi. Sorry for what is perhaps a neophyte question: is it possible to pass a variable to a PHP script from inside another PHP piece of code? For instance, the file test.php (which of course...
11
8288
by: Jef Driesen | last post by:
I have the following problem in a C project (but that also needs to compile with a C++ compiler). I'm using a virtual function table, that looks like this in the header file: typedef struct...
0
7100
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7126
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4865
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.