Put the following code in ASPX.
<script language=javascript> function CloseWindow() { window.open('', '_self', ''); window.close(); } </script>
Put the following code in the code per click.
string myclosescript = "<script language='javascript' type='text/javascript'>CloseWindow();</script>"; Page.ClientScript.RegisterStartupScript(GetType(), "myclosescript", myclosescript);
If you don't have processing before closing, you can directly put the following code in ASPX itself in the clickTick tag.
OnClientClick="CloseWindow();"
Hope this helps.
Kamleshkumar Gujarathi Nov 11 '14 at 11:44 2014-11-11 11:44
source share