• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

How to include an asp file on directory up from where it is?

I have included a file in additionaltoolsmain.asp but my include file path is incorrect.  I just haven't seen it.  Do you know what is wrong with the include line.  When I move the file to the root directory, and
take out the "..\" it works just fine.
root
toolbar.asp
/addtionaltools
/additionaltools/additionaltoolsmain.asp

<!--#include file="..\toolbar.asp"-->
0
swansonplace
Asked:
swansonplace
4 Solutions
 
sirbountyCommented:
What about like
additionaltools\additionaltoolsmain.asp
0
 
kevp75Commented:
any chance you can use virtual include?

<!--#include virtual="/toolbar.asp"-->    <---this would be if toolbar.asp is in the websites root...
0
 
b0lsc0ttIT ManagerCommented:
Make sure the include isn't within ASP tags.  Also you should use a forward slash.

<!--#include file="../toolbar.asp"-->

Let me know if you have a question.

bol
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Ryan ChongCommented:
If you're using IIS 6.0, you also need to check and ensure you enable include from parent directory, for more info, you can refer to this:

Enable Parent Paths Is Disabled by Default in IIS 6.0
http://support.microsoft.com/kb/332117

Enabling Parent Paths (IIS 6.0)
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/40993ff2-22c3-48a9-ba01-1056a9425a1e.mspx?mfr=true
0
 
swansonplaceAuthor Commented:
That information did it.  Thank you.  
0
 
b0lsc0ttIT ManagerCommented:
I'm glad I could help.  Thanks for the fun question, the grade and the points.

bol
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now