471,122 Members | 2,424 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,122 software developers and data experts.

GetCurrentDirectory question

pb
I am using asp.net and have some code in a file in the App_Code
directory. I also have a text file in the same directory that I want
to access. This file will always br in the same directory but I will
not know the absolute path.

When I try...

Dim s As String = Directory.GetCurrentDirectory

I get

'c:\program files\microsoft visual studio 8\common7\IDE'

which is not the current directory of the code file that this is being
called from.

What am I missing?

Pb

Jun 17 '07 #1
1 1274

"pb" <ph**********@hotmail.comwrote in message
news:11*********************@n15g2000prd.googlegro ups.com...
>I am using asp.net and have some code in a file in the App_Code
directory. I also have a text file in the same directory that I want
to access. This file will always br in the same directory but I will
not know the absolute path.

When I try...

Dim s As String = Directory.GetCurrentDirectory

I get

'c:\program files\microsoft visual studio 8\common7\IDE'

which is not the current directory of the code file that this is being
called from.

What am I missing?
Mappath method in .Net Framework 2.0 and if it's .Net Framework 1.1, then
use Goole to find it out. I think it's MapServer in 1.1
Jun 17 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Stevey | last post: by
7 posts views Thread by Dan | last post: by
2 posts views Thread by poppy | last post: by
3 posts views Thread by Maileen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.