I have an ASP.net MVC 3 application where I want to save the image as bytes in the model, and then load it from the model into the src attribute of the html image tag.
eg.
//Property in Model public byte[] Image { get; set; }
But when I try this, these are errors:
<img src = "@Model.Image" alt=""/>
How to load an image from bytes? I want to avoid calling the controller again to get the image as FileResult.
Is it possible?
source share