title: Use a System.Drawing.Image in an HTML tag
body: <p>I have a potentially easy question.  I have an image stored in a database, I then used a C# method in my application that gets that image and stores it in a custom class that looks like this:</p>
  
  <pre><code>public class MyImage
  {
   public System.Drawing.Image myImageFromDB;
   public string imageName;
   public int imageNumberInCollection;
  }
  </code></pre>
  
  <p>My question is this: Can I/How can I use the image from this class in an HTML image tag?  I have attempted the following but it just returns a box with a red X in it:</p>
  
  <pre><code>//myImageFromDBCollection is a list of MyImage objects
  foreach(var ind in myImagesFromDBCollection)
  {
    table += String.Format("&lt;image src={0} /&gt;", ind.myImageFromDB);
  }
  </code></pre>
  
  <p>Any ideas on what I am doing wrong?</p>