closing an ASP.net program

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a program in which there is an exit application program in which I
would like to close the browser window the application is located in. The
problem is that I can't figure out how to accomplish this task.
 
bbdobuddy said:
Hi,

I have a program in which there is an exit application program in
which I would like to close the browser window the application is
located in. The problem is that I can't figure out how to accomplish
this task.

By the way: closing a browser window does NOT end the Web-application!
There is ONE web-application, running on the server, serving multiple
users simultaneously.

Hans Kesting
 
You need to make a javascript call window.close() on client side. If it is
the last open window, the browser will ask for user confirmation.

Eliyahu
 
In response to Eliyahu's response, to avoid the confirmation dialog,
add the following line immediately before the line containing
window.close();

window.opener = window.self;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top