I have a File button to search for a File. I want to take the selected Path and display it in an iframe.
<div class="editor-field">
@Html.TextBox("file", "", new { type = "file" })
</div>
My current iframe is:
@Html.AntiForgeryToken()
<iframe src="@Url.Action("GetPDF")" ; height="1000" ; width="1000";%>'></iframe>
My current (static) GetPDF Method is the following:
public FileStreamResult GetPDF()
{
FileStream fs = new FileStream("D:\\Temp.pdf", FileMode.Open, FileAccess.Read);
return File(fs, "application/pdf");
}
So could you please help me and tell me how I can update my Iframe to the Pdf that i choose with my editor-field?
GetPDFaction will be trying to load the PDF from server side.