Feb 03, 2015 10:19 PM|Zhi Lv - MSFT|LINK
As for this issue, because I didn’t install MySQL database in my machine, so I can’t test your code on my side. But, from your code, I suggest you could try to use
Convert.ToBase64String() method to convert the passportImage1. The following code is used to display the binary image from SQL database, you could refer to it.
byte bytes = (byte)GetData("SELECT Data FROM tblFiles WHERE Id =" + id).Rows["Data"];
string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
Image1.ImageUrl = "data:image/png;base64," + base64String;
For more details, please see: