I am using a FileContentResult method to fetch a byte array from the database and render an image in the view. Works great but I can't figure out how to add an image alt tag (it would be the record name associated with the database record). I can either pass the name into the FileContentResult method or retrieve it from the database with the byte array and file type.
This is my return statement from the FileContentResult method:
return File(imageBinary, fileType);
This is my image tag from the view:
@foreach (var i in Model.Items)
{
<li>
<img src="@Url.Action("GetCatalogImage", "Gallery", new {ID=i.ItemID, Entity="item", Size="t" })" />
</li>
}