Getting the Virtual Directory

  • Thread starter Thread starter Ralph Krausse
  • Start date Start date
R

Ralph Krausse

I wish to get the path in my codeBehind file like Server.MapPath()
does in my aspx file. Doing a Directory.GetCurrentDirectory() in my
Page_Load gets me c:\Windows\system32


thanks

Ralph Krausse
www.consiliumsoft.com
Use the START button? Then you need CSFastRunII...
A new kind of application launcher integrated in the taskbar!
ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg
 
Dim s As String = HttpContext.Current.Server.MapPath("~")

Not sure is that is the "best" way.

Greg
 
HttpContext.Current.Request.ApplicationPath

Hope this helps,
Mark Fitzpatrick
Microsoft MVP- FrontPage
 

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

Back
Top