View Full Version : May use include file inside a conditional

08-02-2007, 05:01 PM
May use include file inside a conditional
<% ...
if x>0 then %>
<!-- #include file=111.asp /-->
<% else %>
<!-- #include file=222.asp /-->
<% end if

or for this I must use subprocedures ?

08-02-2007, 06:06 PM
I never could get that to work either, but you might want to try this instead.

If x > 0 then
End If

08-02-2007, 09:15 PM
Yes, you can . Just remember to open and close the if statement with delimiters because the include file MUST be outside of the asp delimiters.

Note an asp include looks like this
<!-- #include FILE="../Includes/Adovbs.inc" -->

There is NO closing /

Also if you are going to use parent paths they must be turned on in IIS.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum