I have Image column in Ms Sql Database.Pdf files are in that column.
public ActionResult Index()
{
DatabaseEntities _ context = new DatabaseEntities();
var PdfFile = _context.FileTable.where(p=>p.Id==1).Select(s=>s.FileData).FirstOrDefault();
return view();
}
I select file's Byte and set it to "var PdfFile"
But i am not sure how can i call PdfFile in view and display inside html div in asp.net mvc ?
Any help will be greatly appreciated.
Thanks.