No Why? Because includes are preprocessor instructions i.e. they are executed before the ASP dll processes the script.
Also, you shouldn't do <!--#include file="xxx.asp"--> as part of a conditional statement. All includes are kind of included. What I mean is that although code therein may not appear to be executed, any variables defined and populated therein are. e.g. try this dim i i=1 dim j j=2 if i>0 then <!--#include virtual="/includes/iis1.asp"--> else <!--#include virtual="/includes/iis0.asp"--> end if response.write j Now in /includes/iis1.asp put dim j j=3 and in /includes/iis0.asp dim j j=4 If you are using option explicit, which you should be, the whole thing will fall over straight away. If you aren't, when you response.write j at the bottom you will get 4, not 3 like you expect. also use include virtual="/path/file.asp" - you won't ever regret it. Good luck Mark -----Original Message----- From: lamb.rob [mailto:[EMAIL PROTECTED]] Sent: woensdag 21 augustus 2002 16:49 To: ActiveServerPages Subject: Is it possible to add a variable to an include statement For example create variable variable = bob then..where i want my include sataemant to be write <% Response.Write "<!--#include file="mypagename & "bob" & 12.asp" --> %> TIA --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
