I use dynamic downloads for my site loaded from the database
the download is opened in new window.

after the download i want to close the browser

The download process:
Code:
                    Response.Buffer = True
                    Response.Clear()
                    Response.ClearContent()
                    Response.ClearHeaders()
                    Response.ContentType = "application/octet-stream"
                    Response.AddHeader("Content-Disposition", "attachment; filename=""" + objRow(0)(DownloadData.FieldDownloadsFilename) + """;")
                    Response.AddHeader("Content-Length", objRow(0)(DownloadData.FieldDownloadsFilesize))
                    Response.BinaryWrite(varBuffer)
                    Response.Flush()
Close browser process
Code:
                    Response.ContentType = "text/html"
                    Response.Write("<script>browser.close();</script>")
The problem is after flushing the response i cant set back the contenttype

I tried to create new HTTPResponse object, but then the BinaryWrite method is not available.