title: how to get website root path in c#?
body: <p>In c# code, I need to write src for an image. Does anyone know how to get website root path in c#? My folder structure is UI/Image
  I found that when I use</p>
  
  <pre><code>string rootpath=Page.Request.ApplicationPath;
  </code></pre>
  
  <p>If run the application in debug model, it works. But if run it by typing url directly, it won't show image. The property of the image is <a href="http://image/turnon.bmp">http://image/turnon.bmp</a> which should be <a href="http://localhost/image/turnon.bmp">http://localhost/image/turnon.bmp</a></p>
  
  <p>Any idea?</p>