0

In my ASP.NET application on a button click i am writing a .pdf content dynamically and the I am allowing to download for a User

Now to download i used Response.End() and need to refresh a download count on a page But due to Response.End it is not happening

Please suggest

dizad87
  • 448
  • 4
  • 15
Rakesh Sawant
  • 69
  • 2
  • 4
  • 12

1 Answers1

3

And it will never happen - You can not refresh page after Response.End

The way you download the files is not the best one. Use a handler for the download files and a simple anchor to that file.

Examples / Similar :
file download by calling .ashx page
What is the best way to download file from server
Hide modal window after Response.End() in asp.net

Community
  • 1
  • 1
Aristos
  • 66,005
  • 16
  • 114
  • 150