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

Posted on 2007-04-06
Last Modified: 2007-04-09
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.

<!--#include file="..\toolbar.asp"-->
Question by:swansonplace
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 67

Assisted Solution

sirbounty earned 50 total points
ID: 18867876
What about like
LVL 25

Accepted Solution

kevp75 earned 100 total points
ID: 18868214
any chance you can use virtual include?

<!--#include virtual="/toolbar.asp"-->    <---this would be if toolbar.asp is in the websites root...
LVL 54

Assisted Solution

b0lsc0tt earned 50 total points
ID: 18868438
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.

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

LVL 52

Assisted Solution

by:Ryan Chong
Ryan Chong earned 50 total points
ID: 18868944
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

Enabling Parent Paths (IIS 6.0)

Author Comment

ID: 18875744
That information did it.  Thank you.  
LVL 54

Expert Comment

ID: 18876291
I'm glad I could help.  Thanks for the fun question, the grade and the points.


Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question