User-1330468790 posted
Hi salmanm22,
You should share the codes so that we know how you implement this dynamic data in webforms.
Regarding how to display the image instead of URL, you could directly assign the url to the image control or convert the image to base64 format and assign the value to the image control.
If the control is of type dynamic, you might need to find dynamic control in the project and modify it as an image control in code behind.
Convert image to base64:
using (Image image = Image.FromFile(imagePath))
{
using (MemoryStream m = new MemoryStream())
{
image.Save(m, image.RawFormat);
byte[] imageBytes = m.ToArray();
// Convert byte[] to Base64 String
string base64String = Convert.ToBase64String(imageBytes);
// Assign the base64 string to the Image control
Image1.ImageUrl = "data:image/png;base64," + base64String;
}
}
Hope helps.
Best regards,
Sean