suppose we have so many web form , Is there any function close all web form and close the net
  • suppose we have so many web form , Is there any function close all web form and close the net
    Thanks
  • 5 Comments sorted by
  • Hi  this  Work in asp.net c#  

    ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true);
  • suppose we have so many web form , Is there any function close all web form and close the net
  • Hello Gurbachan

    It is not possible to Close any specific browser windows. But you can close current Browser window like this.
     <a href="javascript:top.close()">close your browser window</a>

    Hope this will work. 

    To Open Windows programmatically and then close them use this code./

     <!DOCTYPE html>
    <html>
    <head>
    <script>
    function openWin()
    {
    myWindow=window.open("","","width=200,height=100");
    myWindow.document.write("<p>This is 'myWindow'</p>");
    }

    function closeWin()
    {
    myWindow.close();
    }
    </script>
    </head>
    <body>

    <input type="button" value="Open 'myWindow'" onclick="openWin()" />
    <input type="button" value="Close 'myWindow'" onclick="closeWin()" />

    </body>
    </html>
     
     
  • you can close browser one by one


    <script type="text/javascript">
    window.close();
    </script>
  • window.close() does not work properly in Google Chrome.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week