ASP code that closes a page from the code behind by sending java script to the pages response
string close = @"<script type='text/javascript'>window.returnValue = true; window.close();</script>"; base.Response.Write(close);