title: How to view PDF document in MVC and not download it directly?
body: <p>I have a link on click on it an HTML page will be converted to PDF document then return this PDF file to the user.</p>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;li&gt;&lt;a href='@Url.Action("GetHTMLPageAsPDF", "Transaction", new { empID = employee.emplID })'&gt;ViewReceipt&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>Code behind:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public FileResult GetHTMLPageAsPDF(long empID)
  {
      string htmlPagePath = "anypath...";
      // convert html page to pdf
      PageToPDF obj_PageToPDF = new PageToPDF();
      byte[] databytes = obj_PageToPDF.ConvertURLToPDF(htmlPagePath);
  
      // return resulted pdf document
      FileResult fileResult = new FileContentResult(databytes, "application/pdf");
      fileResult.FileDownloadName = empID + ".pdf";
      return fileResult;
  }
  </code></pre>
  
  <p>The problem is when this file returned its downloaded to the user computer directly, I want to display this PDF file to the user then if he wants he can download it.</p>
  
  <p>How can I do this?</p>