Reputation: 644
I want to get the [browser] close button event in my web app. I know how to get it client side by javascript but there are some problems within. Is it possible to get this event server side in my web app?
Thanks
Upvotes: 0
Views: 2634
Reputation: 4067
Can't be done through server code, but you can add some code on your server-side event which adds <script type="text\javascript">window.close();</script>
when it finishes.
Have a look at ClientScriptManager.RegisterClientScriptBlock.
Upvotes: 2