I have a C#.net class library that references a folder and the files in it.
I’ve added this library as a reference in my ASP.NET web project and I can’t figure out how i’m supposed to get the path to this folder.
Anyone know? Or would you have to pass the Server.MapPath in from the website?
Cheeres
Assemblies usually have no idea where the caller is running from; which is what you are after. The reasoning is that sometimes assemblies are gac’d, sometimes they are in the same bin folder, etc.
The web project should get it’s own path then pass that to the assembly.
OR you could have the path in the web.config, and let the assembly read the path information from there.