0

The following button does not close a Chrome page/tab on click. What am I missing?

<asp:Button id="Test" runat="server" Text="Close Page" onClientClick="window.close(); return true;" 
Hidalgo
  • 941
  • 2
  • 14
  • 38
  • 2
    Did you read the documentation [Window.close()](https://developer.mozilla.org/en-US/docs/Web/API/Window/close)? → "*Scripts may not close windows that were not opened by script*" – Igor Jan 29 '20 at 15:27
  • @Igor Thank you for the link to the documentation. I wonder how else I can close the window. – Hidalgo Jan 29 '20 at 17:11
  • With the exception of the asking the user to close the browser tab you can't. – Igor Jan 29 '20 at 18:40

0 Answers0