I am trying to set up a website with a basic template, which is created already, to include different text depending on which page is being created.
Here is my code. It gets the filename of the text to be included and inserts it into an include statement.
For now I am just testing it with no variables, so it tries to insert the "home.inc" text into the area.
... And I put this line where I want the text to be included.
when I view source, the above line shows as
and does not work. The area that the text should be in is blank. Does anyone know why this is, and how I can accomplish this task?
Here is my code. It gets the filename of the text to be included and inserts it into an include statement.
For now I am just testing it with no variables, so it tries to insert the "home.inc" text into the area.
Code:
If Request.QueryString("txtinc").Count > 0 then
includeTXT= "<!--#include file=""inc/" & txtinc & """-->"
Else
includeTXT= "<!-- #include file=""inc/home.inc""-->"
End If
... And I put this line where I want the text to be included.
Code:
<% Response.write includeTXT %>
when I view source, the above line shows as
Code:
<!-- #include file="inc/home.inc"-->
and does not work. The area that the text should be in is blank. Does anyone know why this is, and how I can accomplish this task?