C# code:
public ActionResult GetDoucmentImage(long onBaseDocumentId)
{
onBaseDocumentId = 1111;
OnBaseDataAccess db = new OnBaseDataAccess();
OnBaseDocument document = db.GetDocument(onBaseDocumentId);
return View("GetDoucmentImage", document);
}
View Code:
@{
var base64 = Convert.ToBase64String(Model.Data);
var imgSrc = String.Format("data:image/png;base64,{0}", base64);}
<img src="@imgSrc" style="width:200px; height:400px;"/>
Trying to show an image in browser, it works in IE but not in chrome