I want to display an image on a web page using HTML
tag.
I have stored the image on my local drive.
How to achieve this?
Th
You can look into my answer . I have resolved the issue using C# language
Why can't I do ?
if (File.Exists(filepath)
{
byte[] imageArray = System.IO.File.ReadAllBytes(filepath);
string base64ImageRepresentation = Convert.ToBase64String(imageArray);
var val = $"data: image/png; base64,{base64ImageRepresentation}";
imgEvid.Attributes.Add("src", val);
}
Hope this will help