|
 |
asp_web_howto thread: Dynamically generating include files
Message #1 by dfalconer@g... on Tue, 26 Nov 2002 15:29:30
|
|
I have a session variable which is a filename
e.g session("file") = header1.asp
The contents of the session variable depends on the user logged in.
I want to use this session variable to call to call an file to be included.
e.g.
<!--#INCLUDE FILE="<%=session("file")%>" -->
However this doesn twork and i didnt expect it to, does anyone know a way
to do this or an alternative, i wan the header shown to vary depending on
the user?
Message #2 by "phil griffiths" <pgtips@m...> on Tue, 26 Nov 2002 16:15:34
|
|
If you are running IIS5 you can use Server.Execute(filename) instead.
hth
Phil
>-----------------------------------
> I have a session variable which is a filename
> e.g session("file") = header1.asp
> The contents of the session variable depends on the user logged in.
> I want to use this session variable to call to call an file to be
included.
e> .g.
> <!--#INCLUDE FILE="<%=session("file")%>" -->
> However this doesn twork and i didnt expect it to, does anyone know a
way
t> o do this or an alternative, i wan the header shown to vary depending
on
t> he user?
Message #3 by dfalconer@g... on Tue, 26 Nov 2002 16:42:50
|
|
Cheers Phil unfortunately i am on IIS 4 so that isnt an option, any other
ideas?
> If you are running IIS5 you can use Server.Execute(filename) instead.
> hth
P> hil
>> -----------------------------------
>> I have a session variable which is a filename
>> e.g session("file") = header1.asp
> > The contents of the session variable depends on the user logged in.
>> I want to use this session variable to call to call an file to be
i> ncluded.
e> > .g.
> > <!--#INCLUDE FILE="<%=session("file")%>" -->
> > However this doesn twork and i didnt expect it to, does anyone know a
w> ay
t> > o do this or an alternative, i wan the header shown to vary depending
o> n
t> > he user?
Message #4 by "Joe" <joe@k...> on Thu, 28 Nov 2002 10:49:45
|
|
Hi
Stumbled accross this article, remembered post.
http://www.asp101.com/articles/michael/dynamicincludes/default.asp
HTH
Joe
Message #5 by "phil griffiths" <pgtips@m...> on Thu, 28 Nov 2002 12:53:55
|
|
Sorry, I don't know of any way if your include file is asp. If it was
just static content then you could read the file off disk and write its
contents to the Response object...
Phil
>-----------------------------------------------------------
> Cheers Phil unfortunately i am on IIS 4 so that isnt an option, any other
> ideas?
>>-----------------------------------------------------------
>> If you are running IIS5 you can use Server.Execute(filename) instead.
>> hth
>> Phil
>>----------------------------------------------------------
|
|
 |