As a newbie to ASP.NET, I'm not sure about the best solution to my problem. I have a line of code like:
xDoc.Load("Templates/template1.cfg");
xDoc is XmlDocument. In my project at the top level there is a directory called "Templates". When I run the project in debug mode, I get DirectoryNotFoundException, and apparently, it looks for the Templates directory in C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\Templates.
How to correctly point to this directory without hard coding?
source
share