public ActionResult GetImage(int ID) { var imgquery = (from img in dbContext.Personaldetails where img.ID == ID select new { Image = img.Image }).FirstOrDefault(); { System.IO.MemoryStream outStream = new System.IO.MemoryStream(); byte[] Image = imgquery.Image; return File(Image, "Image/jpg"); } }
<img src="@Url.Action("GetImage/1", "Home")" alt = "image" />
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)