title: How to load an image from the server in a web application in C#
body: <p>I actually have a C# winform application which load images from my computer <code>C://images/...</code> with the Image object and the function Fromfile.</p>
  
  <pre><code>Image.FromFile(Path);
  </code></pre>
  
  <p>but in my web application (ASP)</p>
  
  <pre><code>&lt;asp:Image ID="viewPhoto" runat="server" Width="550px" Height="400px"/&gt;
  </code></pre>
  
  <p>I use the attribute ImageURL.</p>
  
  <pre><code>viewPhoto.ImageURL = Path
  </code></pre>
  
  <p>But the problem is that it doesn't find the correct path because with this way. The path will be <code>http://localhost:3656/C://images....</code></p>
  
  <p>I would like to load an image directly from my server to have the correct path for both of my applications.(web ASP and winform)</p>
  
  <pre><code>Image.FromFile(/images/myimage.jpg)
  </code></pre>
  
  <p>This actually doesn't work because the program doesn't find any photo in this path.</p>