title: get to root folder of website project from codebehind (.net)
body: <p>I have a .net-website project and want to get some file from app_data folder.</p>
  
  <p>I know I can get the folder in markup like this: </p>
  
  <pre><code>"~/App_Data/myfile.csv"
  </code></pre>
  
  <p>But from Code-behind, I tried </p>
  
  <pre><code>File.OpenWrite(String.Format(@"~/App_Data/myfile.csv"));
  </code></pre>
  
  <p>resulting in error</p>
  
  <p>"Could not find path \"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\~\App_Data\myfile.csv\" (translated)</p>