469,140 Members | 1,326 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,140 developers. It's quick & easy.

Included files paths chg by calling page...

As I'm writing this I think I am answering my own question, but I'd like to
get any other ideas on the subject as well.

I have a standard Header.asp that I want to include in every other page in
my site. Header.asp is located in the root folder, but the calling pages are
in various folders/levels. Since the relative paths specified in header are
subject to change and are based on the relative path of the calling page,
problems arise. (Strangley, using the IFRAME method of including a header
doesn't react the same way.)

The solution I believe lies in using absolute paths in the Header.asp file
using the "virtual" include qualifier. But this assumes your development
directory structure is the same as your production environment. So I guess
that is the answer. Use absolute paths and set up your development directory
structure to be identical to your production.

Any other thoughts/best practices?
Jul 22 '05 #1
4 1289
use virtual includes to call yuo headers as they will work the same
everywhere
http://www.powerasp.com/content/code...s/includes.asp

then in your headers use full urls to everything or virtual paths so theyt
work from any level ogf your site
"Chad Richardson" <chad@NIXSPAM_chadrichardson.com> wrote in message
news:11*************@corp.supernews.com...
As I'm writing this I think I am answering my own question, but I'd like
to get any other ideas on the subject as well.

I have a standard Header.asp that I want to include in every other page in
my site. Header.asp is located in the root folder, but the calling pages
are in various folders/levels. Since the relative paths specified in
header are subject to change and are based on the relative path of the
calling page, problems arise. (Strangley, using the IFRAME method of
including a header doesn't react the same way.)

The solution I believe lies in using absolute paths in the Header.asp file
using the "virtual" include qualifier. But this assumes your development
directory structure is the same as your production environment. So I guess
that is the answer. Use absolute paths and set up your development
directory structure to be identical to your production.

Any other thoughts/best practices?

Jul 22 '05 #2
and yes virtual includes are going to be different on your lcaol machine
than on the live server

there isnt much you can do about that unless parent paths are enabled and
you want to do all your includes with "../" info which will work both at
home and n the live server

"Chad Richardson" <chad@NIXSPAM_chadrichardson.com> wrote in message
news:11*************@corp.supernews.com...
As I'm writing this I think I am answering my own question, but I'd like
to get any other ideas on the subject as well.

I have a standard Header.asp that I want to include in every other page in
my site. Header.asp is located in the root folder, but the calling pages
are in various folders/levels. Since the relative paths specified in
header are subject to change and are based on the relative path of the
calling page, problems arise. (Strangley, using the IFRAME method of
including a header doesn't react the same way.)

The solution I believe lies in using absolute paths in the Header.asp file
using the "virtual" include qualifier. But this assumes your development
directory structure is the same as your production environment. So I guess
that is the answer. Use absolute paths and set up your development
directory structure to be identical to your production.

Any other thoughts/best practices?

Jul 22 '05 #3
and sorry for typos..
new laptop. damn small keybord

"Kyle Peterson" <kp*****@hotmail.com> wrote in message
news:OV**************@TK2MSFTNGP14.phx.gbl...
use virtual includes to call yuo headers as they will work the same
everywhere
http://www.powerasp.com/content/code...s/includes.asp

then in your headers use full urls to everything or virtual paths so theyt
work from any level ogf your site
"Chad Richardson" <chad@NIXSPAM_chadrichardson.com> wrote in message
news:11*************@corp.supernews.com...
As I'm writing this I think I am answering my own question, but I'd like
to get any other ideas on the subject as well.

I have a standard Header.asp that I want to include in every other page
in my site. Header.asp is located in the root folder, but the calling
pages are in various folders/levels. Since the relative paths specified
in header are subject to change and are based on the relative path of the
calling page, problems arise. (Strangley, using the IFRAME method of
including a header doesn't react the same way.)

The solution I believe lies in using absolute paths in the Header.asp
file using the "virtual" include qualifier. But this assumes your
development directory structure is the same as your production
environment. So I guess that is the answer. Use absolute paths and set up
your development directory structure to be identical to your production.

Any other thoughts/best practices?


Jul 22 '05 #4
Great, thanks Kyle.
"Kyle Peterson" <kp*****@hotmail.com> wrote in message
news:uX**************@tk2msftngp13.phx.gbl...
and yes virtual includes are going to be different on your lcaol machine
than on the live server

there isnt much you can do about that unless parent paths are enabled and
you want to do all your includes with "../" info which will work both at
home and n the live server

"Chad Richardson" <chad@NIXSPAM_chadrichardson.com> wrote in message
news:11*************@corp.supernews.com...
As I'm writing this I think I am answering my own question, but I'd like
to get any other ideas on the subject as well.

I have a standard Header.asp that I want to include in every other page
in my site. Header.asp is located in the root folder, but the calling
pages are in various folders/levels. Since the relative paths specified
in header are subject to change and are based on the relative path of the
calling page, problems arise. (Strangley, using the IFRAME method of
including a header doesn't react the same way.)

The solution I believe lies in using absolute paths in the Header.asp
file using the "virtual" include qualifier. But this assumes your
development directory structure is the same as your production
environment. So I guess that is the answer. Use absolute paths and set up
your development directory structure to be identical to your production.

Any other thoughts/best practices?


Jul 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by juglesh | last post: by
7 posts views Thread by mark | last post: by
7 posts views Thread by Travis Pupkin | last post: by
27 posts views Thread by Jon Slaughter | last post: by
10 posts views Thread by kimiraikkonen | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.