When you send back a file for the user to download, that is the HTTP request. In other words, you can either have a post-back which refreshes the browser page or you can send a file for the user to download. You cannot do both without special tricks.
This is why most sites when you download a file, it first takes you to a new page that says, "Your download is about to begin", and then subsequently "redirects" you to the file to download using meta-refresh or javascript.
For example, when you go here to download the .NET 4 runtime:
http://www.microsoft.com/downloads/en/confirmation.aspx?FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7&displaylang=en&pf=true
It renders the page, then uses the following meta-refresh tag to actually give the user the file to download:
<META HTTP-EQUIV="refresh" content=".1; URL=http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe" />
You'll probably have to do something similar in your app. However, if you are truly interested in doing something after the file is completely downloaded, you're out of luck, as there's no event to communicate that to the browser. The only way to do that is an AJAX upload like gmail uses when you upload an attachment.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…