--- in default.asp ---
<%@ LANGUAGE="VBScr ipt" %>
<% Option Explicit %>
<!--#include file="somefile. asp"-->
<!--#include file="../some/otherfile.asp"-->
<!--#include virtual="/asp/anotherfile.asp "-->
--- in somefile.asp ---
<!--#include file="thisfile. asp"-->
<%@ LANGUAGE="VBScr ipt" %>
<%
'asp code for somefile.asp goes here
%>
--- in thisfile.asp ---
<%@ LANGUAGE="VBScr ipt" %>
<%
'asp code for thisfile.asp goes here
%>
--- in ../some/otherfile.asp ---
<%@ LANGUAGE="VBScr ipt" %>
<%
'asp code for otherfile.asp goes here
%>
--- in /asp/anotherfile.asp ---
<%@ LANGUAGE="VBScr ipt" %>
<%
'asp code for anotherfile.asp goes here
%>
What you get when you load default.asp
<%@ LANGUAGE="VBScr ipt" %>
<% Option Explicit %>
<% 'asp code for thisfile.asp %>
<% 'asp code for somefile.asp %>
<% 'asp code for ../some/otherfile.asp %>
<% 'asp code for /asp/anotherfile.asp %>
<%
' rest of asp code in default.asp
%>
Any loaded pages should have the language directive and then option explicit
then include files and/or additional code. Any included files should NOT
have option explicit. Also, include directives can be anywhere in your
document but not between <% %> tags.
I have in my files:
default.asp
<%@ LANGUAGE="VBScr ipt" %>
<% Option Explicit %>
<!--#include virtual="/asp/header.asp"-->
<%
' additional code
%>
<!--#include virtual="/asp/footer.asp"-->
--
Roland
This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.
"TomB" <sh*****@hotmai l.com> wrote in message
news:Od******** ******@tk2msftn gp13.phx.gbl...
make sure the file you are "include"in g doesn't also have <%option
explicit %> set.
"biro man" <al************ @hotmail.com> wrote in message
news:vs******** ****@corp.super news.com... I have a dynamic database driven page that I have been working on and
tweaking etc until I have got it to work pretty much the way I want it
to.
I also have a defined website. I wish to include the new dbase page in
the exisiting website and keep the "feel" of the exisiting website.
So I thought the easiest way to do this wasy to use the template that I
had created for the existing site and then just *include* the .asp pages.
However..when I tried this i get the following error
Microsoft VBScript compilation (0x800A0400)
Expected statement
/sitename/ripe45/default.asp, line 1
Option Explicit
default.asp is the name of the asp page that I have newly created and
works fine as a standalone page.
when I put it into the template page, I get the error...
incidently line 1 in default.asp is <% option explicit %>
any ideas? or even better if you point me in the direction of some pages
that might explain it.
many thanks