Reputation:
I have a webpage on this webpage I need to find the directory name on the server. Can someone explain to me how to does this or better yet show me some source code or reference me to a project with some source code that I can download.
Upvotes: 1
Views: 411
Reputation: 7539
Rick Strahl wrote a great article called Making Sense of ASP.Net paths that you should definitely read.
Upvotes: 1
Reputation: 66641
The starting directory name of your webpages on the server is
HttpContext.Current.Request.PhysicalApplicationPath
Upvotes: 0