title: Referencing a virtual directory in C#
body: <p>I have a webserver setup in iis called WebServer, in location ex. C:\inetpub\WebServer\  I have created a virtual directory call it virtualdir where the physical path is outside of the path of my webserver for example the Virtual directory points at C:\inetput\virtualdir, everything works fine and I can access files going to www.myserver.com/virtualdir/test.txt, however I was wondering if from my default.aspx page I can reference the virtual directory as part of my project like so </p>
  
  <pre><code>File.Exists("~/virtualdir/test.txt)
  </code></pre>
  
  <p>or do I have to reference the complete path of the virtual directory like so</p>
  
  <pre><code>File.Exists("C:/inetpub/virtualdir/test.txt")
  </code></pre>
  
  <p>Thank you,</p>