I'm Working in MVC vb.net with asp.net engine instead of Razor.
I'm returning the file like so
1. Return File(xStream, "application/pdf")
and
2. Return File(xStream, "application/pdf", "NameOfFile.pdf")
In my Asp.net page I call the Report like so
<a id="report" href="<%: Url.Action("report", "Report", New With {.id = Model.reportID})%>" target="_blank">Print</a>
Using the first return from above, i get the stream in the browser -> good, except it's not in a new window.
Using the second return from above, i get the stream as a downloaded file.
How can i change my code to open the pdf report like in return 1, exept in a new window?
EDIT:
recently tried scripting the button to use
window.open('<%: Url.Action("Report", "Report", New With {.id = Model.ReportID})%>','_blank');
however this opens a completely new window, i'd like to have a tab opened.