1:
Page.ClientScript.RegisterStartupScript(this.GetType(), "closewindow", "<script language=JavaScript>window.close();</script>");