title: How to Convert Byte[] to Image in asp.net?
body: <pre><code>public System.Drawing.Image byteArrayToImage(byte[] byteArrayIn)
  {
      System.Drawing.Image returnImage = null;
  
      try
      {
          MemoryStream ms = new MemoryStream(byteArrayIn);
          returnImage = System.Drawing.Image.FromStream(ms); // parameter is invalid
  
      }
      catch (Exception ex)
      {
          string a = ex.ToString();
          // Response.Write("sfdsfn");
      }
  
      return returnImage;
  }
  </code></pre>
  
  <p>I did lot of search in Net but i cant get any useful answer for me?
  any help..thanks in advance</p>