I am working on a C # project using ASP.net.
I have a list of reports with a hyperlink for everyone that calls the web server, retrieves the PDF, and then returns the PDF to save or open the user:
ASPX page:
<table>
<tr>
<td>
<a href="#" onclick="SubmitFormToOpenReport();">Open Report 1</a>
<td>
</tr>
...
</table>
ASP.Net:
context.Response.Clear();
context.Response.AddHeader("content-disposition", "attachment;filename=report.pdf");
context.Response.Charset = "";
context.Response.ContentType = "application/pdf";
context.Response.BinaryWrite(myReport);
context.Response.Flush();
This works as expected, however I would also like to refresh the page with the updated list.
I'm having problems since a single request / response returns a report.
Is there any way to refresh the page?
As long as there is a correct answer, feel free to include answers that detail alternative solutions / ideas for this.
source
share