473,385 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

closing an ASP.net program

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.
Nov 19 '05 #1
3 853
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

"bbdobuddy" <bb*******@discussions.microsoft.com> wrote in message
news:79**********************************@microsof t.com...
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.

Nov 19 '05 #2
bbdobuddy wrote:
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
Nov 19 '05 #3
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;

bbdobuddy wrote:
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.


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: simon place | last post by:
Spent some very frustrating hours recoding to find a way of closing a server socket, i'd not thought it would be any problem, however, after complete failure and as a last resort, i looked at the...
7
by: Miktor | last post by:
At the minute I am using the following rather unwieldy function to prevent the console window in Dev C++ from closing before I can see the output from my program: // function to prevent the...
10
by: Ricky W. Hunt | last post by:
I have written a close routine to handle an "Exit" button to close the application properly. How do I make sure this gets executed if the user closes it another way (by pressing the "X" in the...
6
by: **Developer** | last post by:
I've been looking but can't find out how in a form Closing event to know if the closing is because the form's "X" had been clicked or the main form's "X" was clicked. That is, I need to know if...
5
by: Helen Trim | last post by:
I have scheduled programs that run overnight. One of them leaves a window open and this stops other users opening the program. It is a third-party application. Can I write a vb .NET program to...
8
by: cj | last post by:
I know how to write code to find, kill and closeMainWindow on all processes but I really don't want to do that. I want work with applications not processes. As you know there are a lot more...
14
by: cage | last post by:
hello can i write a eof to a file descriptor without closing it? like: fd.write(EOF) or something grts, ruben
1
by: sewid | last post by:
Hi there! I've got a problem with no solution, I hope you might help me. I am writing a small tool with many buttons. Every button starts a thread and this thread starts something else, in the...
2
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
I am (still) relatively new to Windows applications, most of my experience has been Web based, and I am confused about what exactly happens when the Main() method is called and how to manipulate...
4
Fr33dan
by: Fr33dan | last post by:
Hi, I'm having trouble with a multi-threaded program crashing on a specific machine when the worker thread is not initialized at when the _FormClosing method of my main form called. Here is my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.