1

I am working with just IE

I want to implement a button, when the user clicks it, the browser will close

I did this:

ClientScript.RegisterStartupScript(typeof(Page), "closePage", "<script type='text/JavaScript'>window.close();</script>");

the browser really close, but every time I click that button, I got a message from IE states that the web page will be close, with two options yes, and no.

is there any way to avoid that button?

Marco Dinatsoli
  • 10,322
  • 37
  • 139
  • 253
  • possible duplicate of [How can I close a browser window without receiving the "Do you want to close this window" prompt?](http://stackoverflow.com/questions/57854/how-can-i-close-a-browser-window-without-receiving-the-do-you-want-to-close-thi) – Shaharyar Sep 25 '14 at 10:13

0 Answers0