It can be hard to have a window close itself without a client-side event
firing, so it sounds to me like the best thing to do would be to use the
onblur javascript eventhandler to call the window.close() method. If
pressing the enter key causes a resubmit, I would take a look at your
existing code and possibly add or modify something to detect that (I can't
help you do that right now, because I can't see your current code). If you
want to make sure the download finishes before closing the window, a
technique that I once used on an ASP.NET page of mine was to have ASP.NET do
a Response.Redirect to a page with nothing on it except the following:
<html><body onload="window.close();"></body></html>
Using this technique allows ASP.NET cause you to leave the page that
initiated the download by using the Response.Redirect, and then have a
client event get called to allow you to close the new window, leaving you
with a net result of both windows being closed. It may involve creating an
extra page, but the user will probably not even notice the extra page, and
it is a very small page that doesn't even have to be an aspx page. Good
Luck!

Signature
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
> Two questions:
> 1. I have several asp.net pages that initiate a file download, via
[quoted text clipped - 11 lines]
>
> Thanks.