04-15-2002, 05:44 PM
I want to include a different file everytime and I saved the filename into a variable called PAGFILE. This is what im trying to accomplish:
PAGFILE = "/hvwebdesign/pag/default.asp"
<!-- #INCLUDE VIRTUAL=[asp variable PAGFILE goes here] -->
I've tried this but it doesn't work can anyone help??
<% RESPONSE.WRITE "<!-- #INCLUDE VIRTUAL=" & PAGFILE & " -->" %>
04-15-2002, 06:28 PM
Unfortunetly you can not do this. See asp pages are compiled and run EVERYtime they are "hit". Include file are processed (included) before they are compiled, and run. Your tring to use a varible BEFORE its been compiled, run or even initialized.
Hope this helps!
04-15-2002, 06:38 PM
Is there a another way of adding an another page into the main layout page? See here is my problem I have a layout page called default.asp it has menus, tables, titles etc. and I also have pages in the "pag" directory what I want to do is to add the pages in the pag directory into default.asp so everytime I update my layout I only have to update the layout for default.asp and not the rest. If I want to go to another page I use something like this default.asp?page=home.asp. Any ideas.
04-15-2002, 06:46 PM
Heres what i do. Im not sure if it helps your problem.
I have 4 main include files, on all my pages...
[Content Goes here]
Anytime I change the layout, graphics (top.asp, left.asp, right.asp, bottom.asp).. all the pages that use the above template get all the updates to.
Does this help?
04-20-2002, 06:25 PM
Building on what Joan said. default.asp could look something like what is below and contain five individual .inc files -- each with its own *ML code in it
<TD COLSPAN=4><!-- #include file=includes\header.inc --></TD>
<TD><!-- #include file=includes\left_content.inc --></TD>
<TD COLSPAN=2><!-- #include file=includes\mid_content.inc --></TD>
<TD><!-- #include file=includes\right_content.inc --></TD>
<TD COLSPAN=4><!-- #include file=includes\footer.inc --></TD>