2
I have the following line of code that will set the client image on the screen if there is, if not will leave as null. How can I leave dynamic, IE, if the customer does not have the photo will set an image avatar
?
if (!string.IsNullOrEmpty(objCli.CliFoto) == true){
byte[] bytes = Convert.FromBase64String(objCli.CliFoto.Replace("data:image;base64,", ""));
using(MemoryStream ms = new MemoryStream(bytes)){
picbImagemCli.Image = Image.FromStream(ms);
}
} else {
picbImagemCli.Image = null;
}
Changing picbImagemCli.Image = null;` on your Else to the default image does not resolve?
– Celso Lívero