ASP.NET Current directory

A

Alan T

I am testing the ASP.NET in VS 2005 IDE.
My webiste is on:
c:\test\website1

I have a directory called documents in the website directory
c:\test\website1\documents

I want to reference our documents in this directory by using
Path.GetFullPath("documents");

If I run the website by pressing F5, it shows the path of the documents
directory as
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\documents

How do I know if it is correct when the website is running on the live site?

I cannot run the default.aspx in my browser because I got the problem:
I installed VS2003 after VS2005 so I need to run VS2005 IDE.
 
T

tee

Hi Alan,

Have you tried

string sFullpath = Server.MapPath("documents");
Response.Write(sFullpath);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top