473,394 Members | 1,773 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,394 software developers and data experts.

Exiting an ASP.net application

>I have a link button that I want to have the program closed when I click
it.
The quesition is what is the syntax that makes this possible.


<linkdefhere onclick="javascript:window.close();">

I can't figure out where to put this line of code in my Asp.net program
Nov 19 '05 #1
1 914
bbdobuddy wrote:
I have a link button that I want to have the program closed when I
click it.
The quesition is what is the syntax that makes this possible.


<linkdefhere onclick="javascript:window.close();">

I can't figure out where to put this line of code in my Asp.net
program


if you put a
<a href="#" onclick="window.close()">Close browser</a>
somewhere on your page (in the html), then your visitor will
see a link that will close his browser window.

If this was also his last browser-window, then his session is ended,
as far as he is concerned, as the session-cookie has gone.
On the server that session will last probably another 20 minutes!
(by default: 20 minutes after the last request)

This link will *not* close the web-application itself, that will keep running
indefinitely, serving any number of users.

Hans Kesting
Nov 19 '05 #2

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

Similar topics

7
by: David Elliott | last post by:
I have created an application that will dynamically load other DLLs (plugins). The new plugin is a winform with an embedded IE Browser. I am wanting to have the form to run in its own thread....
8
by: Andrew Warren | last post by:
I'm trying to exit a Windows Forms application while in the form's constructor (after InitializeComponent() has been called) and am finding that calling Application.Exit () still leaves the form...
2
by: pnp | last post by:
Hi all, I'm working on a win app that uses a logon form to verify the user that logs in the program and then hides the first form and displays an MDI form where the user does his work. The app is...
6
by: GL | last post by:
I am getting a crash while exiting from my application. Pl find the Stack Trace of the crash: System.Windows.Forms.Application.ThreadWindows.ThreadWindows(System.Windows.Forms.Control parent =...
3
by: Bonj | last post by:
When trying to debug an ASP.NET project by placing a breakpoint in one of the functions in the codebehind, VS correctly stops at the breakpoint, and I can step through. But soon after, the process...
2
by: tt | last post by:
Hi, ANy ideas on this? When I click the close button of a window in VB.net which method gets called? I used Applicaton.exit in some method of my appln. to exit the application but, it still...
5
by: Tim Werth | last post by:
I have a .NET console application that is kicked off by a .NET Windows service. They communicate via .NET Remoting, although there isn't much communication between the two while the console app is...
1
by: kuhrty | last post by:
Hi, I am creating a multi-winform project. Everything has been working fine, except after I perform an update to the database and decide to Exit the winform after the update operation is...
6
by: Ant | last post by:
Hi all, I'm putting together a simple help module for my applications, using html files stored in the application directory somewhere. Basically it sets up a basic web server, and then uses the...
5
by: care02 | last post by:
Hi! I have the following problem: I have written a short Python server that creates an indefinite simulation thread that I want to kill when quitting (Ctrl-C) from Python. Googling around has...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.