title: Relative paths in an ASP.NET application code behind
body: <p>Being new to ASP.NET I'm unsure of the best solution to my problem.  I have a line of code like:</p>
  
  <pre><code>xDoc.Load("Templates/template1.cfg");
  </code></pre>
  
  <p>xDoc is an <code>XmlDocument</code>.  In my project, at the top level there is a directory called Templates.  When I run the project in debug mode, I get a <code>DirectoryNotFoundException</code>, and apparently it's looking for the Templates dir in <code>C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\Templates</code>.</p>
  
  <p>How can correctly point to that directory without hardcoding it?</p>