Depending on the state of the window, you may not be able to. If you
CAN, your best best is to send a JavaScript close command. It's a
major security flaw to allow someone to close your application, so no
browser (not even IE) will allow for that. You need to get user
confirmation...
Start here...
Response.Write("<script>self.close();</script>");
On Oct 9, 9:48 am, m...@o2.pl wrote:
Hi,
I need to send a file to a client and then close current window.
My code looks as follows:
Response.ContentType="application/bmp";
Response.AppendHeader("","attachment; filename=\"" + bmpFilePath +
"\"");
Response.WriteFile(bmpFilePath);
Response.Flush();
Response.End();
//now I need to close this window.
Anyone know how to do it?