I have the following file structure:

/
header.asp
test.asp
/subDir
testpage.asp
/images

I would like to have header.asp to be usable from all directories.
Header.asp will have images and URLs. When I try to #include the file in
test.asp, it works fine. However, if I #include it in testpage.asp, the
images in header do not work - testpage.asp thinks the images are in subDir,
when they are in the images directory. I have tried a variety of
combinations of MapPath, Server.Execute, but I have not gotten the image to
appear correctly. What is the correct syntax for what I am trying to
accomplish?

Thank you for you time,
Jim

Re: Problem with including a header by Ray

Ray
Thu Aug 28 14:41:47 CDT 2003

Do virtual includes and image paths from the root in header.asp. Example:


Do NOT do:

<!-- #include file="../header.asp" -->
<img src="images/something.gif"> (in header.asp)

DO:

<!-- #include virtual="/header.asp" -->
<img src="/images/something.gif"> (in header.asp)

That way it will not matter if you're in a different directory level, since
it will all be relative from the root of your site, the include as well as
the image paths in the include file.

Ray at work

"Jim Mesara" <somebody@yahoo.com> wrote in message
news:billlu$afp0p$1@ID-147295.news.uni-berlin.de...
> I have the following file structure:
>
> /
> header.asp
> test.asp
> /subDir
> testpage.asp
> /images
>
> I would like to have header.asp to be usable from all directories.
> Header.asp will have images and URLs. When I try to #include the file in
> test.asp, it works fine. However, if I #include it in testpage.asp, the
> images in header do not work - testpage.asp thinks the images are in
subDir,
> when they are in the images directory. I have tried a variety of
> combinations of MapPath, Server.Execute, but I have not gotten the image
to
> appear correctly. What is the correct syntax for what I am trying to
> accomplish?
>
> Thank you for you time,
> Jim
>
>