locked
how to display images at runtime in a web appplication RRS feed

  • Question

  • i use C#. and also, how do i get an image to be downloaded from mysql database at runtime upon request. here is a bit of my declaration code and conditional construct code

     byte [] f = (byte[])(read["Passport"]); // this reads d byte data from the column passport in the database and assigns it to byte f.

    if (f == null)

     {
           admin1pass.ImageUrl = null;
     }
     else
     {
           MemoryStream ms = new MemoryStream(f); // this holds the image gotten from the database
           admin1pass.ImageUrl = System.Drawing.Image.FromStream(ms);
     }

    'now thats where i'm stuck. i hv used the

    using System.Drawing;
    using System.Data;

    namespaces but none contains the class Image which is oftren what i use in windows form apps.

    Saturday, August 2, 2014 5:17 PM

Answers

  • They'll help you over here.

    Microsoft C# ASP.Net forum

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Saturday, August 2, 2014 5:22 PM