title: dynamically displaying PDFs in C# MVC with iframe
body: <p>I have a File button to search for a File. I want to take the selected Path and display it in an iframe.</p>
  
  <pre><code>&lt;div class="editor-field"&gt;
              @Html.TextBox("file", "", new { type = "file" })
  &lt;/div&gt;
  </code></pre>
  
  <p>My current iframe is:</p>
  
  <pre><code>@Html.AntiForgeryToken()
      &lt;iframe src="@Url.Action("GetPDF")" ; height="1000" ; width="1000";%&gt;'&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>My current (static) GetPDF Method is the following:</p>
  
  <pre><code>public FileStreamResult GetPDF()
  {
  
          FileStream fs = new FileStream("D:\\Temp.pdf", FileMode.Open, FileAccess.Read);
          return File(fs, "application/pdf");
  
  }
  </code></pre>
  
  <p>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?</p>