Solved

path of project

Posted on 2011-09-16
4
299 Views
Last Modified: 2012-06-22
I have project that is a WEB site and not a WEB application.  A WEB site, since it is compiled on the fly, does not have a "My Project' folder and thus does not have access to the My.Application object.

So, I want to get the path of the root of my application.  I want to access custom text files that reside there as part of my app.  
0
Comment
Question by:HLRosenberger
4 Comments
 
LVL 10

Expert Comment

by:Mez4343
ID: 36550720
did you try
Application.StartupPath
0
 
LVL 28

Accepted Solution

by:
strickdd earned 500 total points
ID: 36550733
Server.MapPath is what you want.

Server.MapPath("/MySiteFolder/Folder/")

Open in new window


The more specific the better, for example specify a filename at the end.
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 36550802

try these...

Server.MapPath("/")
Server.MapPath("~")
Server.MapPath("~/")
Server.MapPath(".")

0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 36550828
That did the trick!  Thanks
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now