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:
Close browser processCode: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()
The problem is after flushing the response i cant set back the contenttypeCode:Response.ContentType = "text/html" Response.Write("<script>browser.close();</script>")
I tried to create new HTTPResponse object, but then the BinaryWrite method is not available.



Reply With Quote