Posts Tagged ‘close window’

Closing Aspx page on PostBack by suppressing close confirmation

February 4, 2012 Leave a comment


Below is the code to close the current .aspx page in the Postback (i.e., On Button click) without “Close” confirmation dialog

// Close the window with no close confirmation

Response.Write(“<script language=’javascript’> {”, ‘_self’, ”); window.close(); }</script>”);

Hope it helps 🙂