ASP include

Associate
Joined
21 Feb 2004
Posts
886
Right basically I want to use asp to include a header (a generic html page) then show body.

So that I can have multiple asp pages with the same header linking to a template header but with different body’s.

I’ve tried including both header and body AND including header then scripting out the body but all it does is place the body over the top left corner. I want it to be placed below the header.

I’ve thought about have a div/layer below the header but that doesn’t work.

Please, please could some one help or show me some script that I could manipulate to help me achieve this page then I can use it as a template to every other page.

Thank you.
 
Soldato
Joined
25 Nov 2002
Posts
3,495
Heh,

Include files aren't that intelligent - they each need to form one part of the page, they can't each be complete html documents, they need to combine together to form a single html document.

Example:

header.asp
<html>
<body>
<div>this is the header</div>
<div>

content.asp
<div>content goes here</div>

footer.asp
</div>
<div>This is the footer</div>
</body>
</html>
 
Associate
Joined
8 Oct 2005
Posts
97
Location
Bristol
i do my templates a bit differently to the last post but only because i find its a bit easier to keep track of the content


template page
<html>
<body>
<div><!-- #include file ="header.asp" --></div>
<div><!-- #include file ="content.asp" --></div>
<div><!-- #include file ="footer.asp" --></div>
</body>
</html>
 
Back
Top Bottom