title: Image src pointing on a file outside my project folder in WEB FORM
body: <p>I'm looking to do this exactly :</p>
  <p><a href="https://stackoverflow.com/questions/12589771/set-src-property-in-view-to-a-url-outside-of-the-mvc3-project">set src property in view to a url outside of the MVC3 project</a></p>
  <p>Fine but in web form ?</p>
  <p>I tried simply putting the path as a string into the src of the image :</p>
  <pre><code>&lt;asp:Image  ID=&quot;imgInside&quot; runat=&quot;server&quot; src=&quot;\\serverName.com\dfs$\APPL-ADM\FichiersDev\MandatsInfo\SAR220-2020_1.jpg&quot; &gt;
  </code></pre>
  <p>Obviously not working, so I made src pointe on this function I wrote like so :</p>
  <pre><code>&lt;asp:Image runat=&quot;server&quot; Width=&quot;160px&quot;  src='&lt;%# getImage(Container.DataItem as MandatMobile.DAL.MandatsEcoleCC_Result) %&gt;' &gt;&lt;/asp:Image&gt;
  </code></pre>
  <p>In back end C# :</p>
  <pre><code>protected Byte[] getImage(MandatsEcoleCC_Result p)
  {
      using (MandatsDatas db = new MandatsDatas())
      {
          GROUPE_ARTICLE g = db.GROUPE_ARTICLE.First(t =&gt; t.ID_GROUPE == p.ID_GROUPE);
  
          if (string.IsNullOrWhiteSpace(g.image))
              return null;
  
          FileStream fs = null;
          try
          {
              fs = new FileStream(@&quot;\\serverName.com\dfs$\APPL-ADM\FichiersDev\MandatsInfo\&quot; + g.MANDAT.NO_MANDAT + g.image, FileMode.Open, FileAccess.Read);
          }
          catch
          {
          }
  
          BinaryReader br = new BinaryReader(fs);
          return br.ReadBytes((int)fs.Length);
      }
  }
  </code></pre>
  <p>Still not working, I've been searching but I just can't figure it out and I'm stuck trying all sorts of non-sens.</p>