IIS - how to close my page on internat explorer in asp.net web application

Asked By pankaj singh on 12-Jun-13 04:01 AM
Hi expert
I have run a web application in asp.net with back end sql server 2008
my problem is that i want to close my page automatically after 1 hours for that i have manage task Scheduler.
i have written following line of code

 foreach (System.Diagnostics.Process exe in System.Diagnostics.Process.GetProcesses())
        {
          if (exe.ProcessName.StartsWith("iexplore"))
            exe.Kill();
        }

but this code is running on local server but not running on iis server.


Robbe Morris replied to pankaj singh on 12-Jun-13 09:28 AM
http is a disconnected protocol.  Your code here is attempting to kill a process on the server not the client's PC.  The browser must execute the close request.  It cannot be done with server side code.
Bill B replied to pankaj singh on 18-Jun-13 01:04 AM
http://www.javascript-coder.com/window-popup/javascript-window-close.phtml

http://stackoverflow.com/questions/2076299/how-to-close-current-tab-in-a-browser-window