Author: mbowles | Posted on: 5/16/2006 11:37:20 AM | Views : 638

Using the following code:

Response.Clear();
Response.ClearHeaders();
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Length", myFile.Length.ToString());
Response.AppendHeader("content-disposition", "attachment; filename=" + System.IO.Path.GetFileName(PhysFilePath));
//Response.WriteFile(PhysFilePath);
Response.TransmitFile(PhysFilePath);
Response.End();

This is launched in a new window and the blank window remains after file download is complete. Is there a way to do this and get the window to close?  A javascript hack after download to window.close does not work.

Thanks!

 
  ...

Go to the complete details ...