title: Iframe shows ActionMethod name while loading PDF file in ASP MVC
body: <p>i am using iframe tag in order to call ActionMethod that returns FileResult  to display PDF file. The issue is after it loads PDF document instead of showing pdf file name, it shows ActionMethod name on the top of the PDF file name in Chrome.</p>
  
  <p>Razor Code:</p>
  
  <pre><code>&lt;iframe src="@Url.Action("GetAgreementToReview", "Employee")" style="zoom: 0.60; -ms-zoom: 1; width: 100%;" width="99.6%" height="420" frameborder="0" id="agreementPdf"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>CS Code:</p>
  
  <pre><code>public ActionResult GetAgreementToReview()
  {
    Response.AddHeader("Content-Disposition", "inline; filename=Master-Agreement.pdf");    
    return File("~/Content/Master-Agreement.pdf", "application/pdf");
  }
  </code></pre>
  
  <p>Image: As you can see in the screenshot, it shows 'GetAgreementToReview' i.e. ActionMethod name instead of 'Master-Agreement.pdf'.</p>
  
  <p><a href="https://i.stack.imgur.com/z3L1c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z3L1c.png" alt="enter image description here"></a></p>
  
  <p>Does anyone know how to fix this issue?
  Thanks.</p>
  
  <p>Sanjeev</p>