title: ASP .NET C# get all text from a file in the web path
body: <p>I'm trying to open a file that includes some data in a web directory that my C# is running.  Basically just turns it into a string.  I tried doing the following...</p>
  
  <pre><code>string email = File.ReadAllText("/orderforms/email_templates/file_to_include.txt");
  </code></pre>
  
  <p>I'm not sure if that is the correct method, but it seems there is a pathing problem, the whole path will change depending what web server it is running on.</p>
  
  <p>This is the directory setup...</p>
  
  <pre><code>/Classes/Page.ascx.cs  (the page that tries to read the text from the
  file)
  /orderforms/&lt;one of multiple pages execute the above class here or in a sub directory
  /orderforms/email_templates/file_to_include.txt
  /orderforms/email_templates/file_to_include2.txt
  </code></pre>
  
  <p>What path and function should I use to read all of the contents of the file to a string?</p>
  
  <p>Thanks</p>