?
Solved

path of project

Posted on 2011-09-16
4
Medium Priority
?
317 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
[X]
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
4 Comments
 
LVL 10

Expert Comment

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

Accepted Solution

by:
strickdd earned 2000 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 58

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

762 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