I am trying to open a PDF in a new tab in the browser. So far I have been able to get the PDF in the browser within the "same" page. However I would now like it to open it in a new tab. However I am stuck on how to achieve this?
Response.Clear()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.AddHeader("Content-Disposition", "inline;filename=" + strFileId & fileExtension)
Response.AddHeader("Content-Length", bytesReturned.Length.ToString())
Response.OutputStream.Write(bytesReturned, 0, bytesReturned.Length)
Response.Flush()
Response.End()
Result:

The result is displayed in a gridview, I would like to link each "view" button to a target"_blank" attribute. The "ID" corresponds to the file name.
From my research, I can see you can add a button in the aspx page and give it target "_blank" attribute but I am not sure how to link it to my displayPDF() method?
If the question is unclear, please let me know.