Click here to Skip to main content
15,894,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi How to close current opening tab or all tab when button click event in same page.I mean i have one asp button,in that button click event i need to close opened browser or all current tab.

What I have tried:

i try this link,but not working

[^]

Regards
Aravindb
Posted
Updated 16-Jan-17 20:44pm
Comments
F-ES Sitecore 17-Jan-17 3:53am    
If the user wants to close the browser they'll close it themselves. Trying to close the browser for the user will simply annoy them as they'll get endless security pop-ups about what your code is trying to do.

1 solution

You should be able to achieve this is in Javascript at client side.
Close newly opened window[^]
javascript - How to close current tab in a browser window? - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900