title: How to open a pdf file in the web browser?
body: <p>I want to <strong>display a pdf</strong>. My current code displayit using a pdf reader. But I want to open it in a <strong>seperate tab of the browser</strong>. How can i do it? I have a link button inside the web page. I have set this in onClick method. How to open it using back end code? (not using a link in aspx)     </p>
  
  <p>Here is my code     </p>
  
  <pre><code>string name = ddlAppealList.SelectedValue.ToString();
  int refNo = Convert.ToInt32(name);
  string FilePath = Server.MapPath("~/filesPDF/" + refNo + ".pdf");
  WebClient User = new WebClient();
  Byte[] FileBuffer = User.DownloadData(FilePath);
  if (FileBuffer != null)
  {
       Response.ContentType = "application/pdf";
       Response.AddHeader("content-length", FileBuffer.Length.ToString());
       Response.BinaryWrite(FileBuffer);
  }
  </code></pre>