R
Ryan Moore
I'm trying to make a page that, when opened, displays a file save dialog,
then closes itself (essentially just leaving the file save dialog). Is this
possible? I've tried this:
Response.ContentType="image/JPEG";
//Response.AddHeader ("Content-Length", FileSize.ToString());
Response.AppendHeader("Content-Disposition","attachment;
filename=img1.jpg");
Response.WriteFile(@"c:\img1.jpg");
Response.Write("<script>window.close();</script>");
Response.Flush();
But the page does not close... any ideas?
then closes itself (essentially just leaving the file save dialog). Is this
possible? I've tried this:
Response.ContentType="image/JPEG";
//Response.AddHeader ("Content-Length", FileSize.ToString());
Response.AppendHeader("Content-Disposition","attachment;
filename=img1.jpg");
Response.WriteFile(@"c:\img1.jpg");
Response.Write("<script>window.close();</script>");
Response.Flush();
But the page does not close... any ideas?