0

I have an MVC.NET C# application. One of the actions returns the File Result

public ActionResult ViewSomePDF()
{
    byte[] fileStream = GetFileStream()
    return File(fileStream, @"application/pdf");
}

The file is being displayed fine; however, I would like to add some HTML controls above the file when it streams. Is that possible in MVC? Can I somehow combine the File Results and the View Result so that the View Result would be on top and the File Result would be on the bottom

Is that possible?

Thank you very much in advance

James
  • 1,081
  • 4
  • 15
  • 34
  • you need to return a view first and then call the file within the view. – Rajesh G Feb 09 '22 at 21:42
  • Thank you ! Is there a certain way to call a file within the view ? Thank you ! – James Feb 09 '22 at 22:36
  • I hope you are looking for this https://stackoverflow.com/questions/2740297/display-adobe-pdf-inside-a-div – Rajesh G Feb 09 '22 at 22:59
  • Thank you, but, unfortunately, that is not a good solution as I am looking specifically for pdf streaming for the security purposes – James Feb 09 '22 at 23:17

0 Answers0