If I use server.mappath to get to the root dir of my application from within
codebehind, it works fine. I also want to use this from a vb class I have in
my application, and I think I have an issue with context because
server.mappath does not work there.
I was thinking I'd just need to be more specific with the namespace and
tried HttpServerUtility.MapPath() (found this in help) but if I try to use
that directly, Intellisense won't accept it saying "Reference to a
non-shared member requires an object reference." so I declared a variable as
a HttpServerUtility, but that fails at runtime with a null object reference
error.
So all I really want to do is be able to refer to my application root folder
from a vb class in my asp.net application. Not sure if I'm close in my
approach above, but if someone could give me a hint on how to do this I'd
really appreciate it. I just want it to work like Server.MapPath in a
codebehind page. Thanks!
Matt