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.
 
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>
 
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>
 
ICE Master said:

Well it's obvious why that's not working, you have several HTML and BODY tags in the completed page. You need to think of your included files as small modules that work together as one complete page. Not separate stand alone files.
 
Back
Top Bottom