We have a web application that generates a report in a popup window based on choices made in the main window. When the report is generated a download should automatically start. After the download, the popup window should close itself.
The automatic download is done by a download.aspx page with a call to Respose in the PageLoad. This works fine, except that all kinds of methods to close the window, don't work.
In both the generate.aspx and download.aspx pages I have a hidden field which is set to "close" after the generation is done and a timer to check its contents and close if it says close.
But it doesn't work.
I'm probably missing a point somewhere, but haven't found lots of similar questions but no working answers...
Hope someone can help.
in the popup window generate.aspx.vb:
hfld_1.Value = "close"
Response.Redirect("download.aspx?" & _qryString, False)
Response.ContentType = "application/pdf"
Response.AppendHeader("Content-Disposition", "attachment; filename=" & _strFileName)