469,630 Members | 1,202 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Include a page in another page, asp, vbscript

21
Hierarchy of directory are as follows:

1.wwwroot
1a. store
1b. hide
1c. full

Suppose a page "fruit.asp" in the 'store' folder.
Another page 'vagitable.asp" in the 'wwwroot' folder.

Now i want to create another page "water.asp" in 'full' folder.

i want to include "fruit.asp" and "vagitable.asp" in "water.asp"

Then, are the following two line are right?

Expand|Select|Wrap|Line Numbers
  1. <!--#include file="../store/fruit.asp" -->
  2. <!--#include file="../vagitable.asp" -->
Dec 12 '07 #1
3 1672
Hierarchy of directory are as follows:

1.wwwroot
1a. store
1b. hide
1c. full

Suppose a page "fruit.asp" in the 'store' folder.
Another page 'vagitable.asp" in the 'wwwroot' folder.

Now i want to create another page "water.asp" in 'full' folder.

i want to include "fruit.asp" and "vagitable.asp" in "water.asp"

Then, are the following two line are right?

Expand|Select|Wrap|Line Numbers
  1. <!--#include file="../store/fruit.asp" -->
  2. <!--#include file="../vagitable.asp" -->
Hi
The two lines are absolutely right.
:)
Dec 13 '07 #2
Nicodemas
164 Expert 100+
Just a quick addendum to the correct answer given above, you must enable parent paths in IIS to be able to begin an INCLUDE with ../. Otherwise an error will be produced.
Dec 14 '07 #3
jhardman
3,406 Expert 2GB
Just a quick addendum to the correct answer given above, you must enable parent paths in IIS to be able to begin an INCLUDE with ../. Otherwise an error will be produced.
Thanks, Nic, I was just about to say it would give an error unless the include file was in the same or a sub-directory. Thanks for clearing that up.

Jared
Dec 14 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Tom Bates | last post: by
2 posts views Thread by Rodger | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.