Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > variable in include file

Reply
Thread Tools

variable in include file

 
 
Frank
Guest
Posts: n/a
 
      01-22-2004
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



 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      01-22-2004
Includes are processed prior to any code. Read here.

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

Ray at work

"Frank" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
 
 
 
 
MePadre
Guest
Posts: n/a
 
      01-22-2004
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
>
>
>
>.
>

 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      01-22-2004
no

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


"Frank" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      01-22-2004
No, you can't do this.
http://www.aspfaq.com/2042

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




"Frank" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
ASP Include file error <!-- #include file="" --> naveeddil ASP .Net 0 01-04-2008 12:58 PM
include file in include file PTM HTML 1 11-12-2007 10:13 AM
ASP Error 0126 include file not found, when using ".." in include file path Eric ASP General 10 01-11-2007 07:38 AM
#include "file" -vs- #include <file> Victor Bazarov C++ 4 03-06-2005 07:09 PM



Advertisments