473,465 Members | 4,818 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Close browser window

Hello,

is it possible to execute something when the browser
window is closed in asp.net?

Thanks
Nov 19 '05 #1
3 2037
Not out of the box. I have heard there is some script you can place on the
form that does something, but it didn't seem like a very clean approach, so
I didn't keep the url.

bill
"Vishal" <an*******@discussions.microsoft.com> wrote in message
news:12****************************@phx.gbl...
Hello,

is it possible to execute something when the browser
window is closed in asp.net?

Thanks

Nov 19 '05 #2
You can use the PAge.RegisterStartupScript to hook into the onUnload event
(http://msdn.microsoft.com/workshop/a...nts/onunload.a
sp), popup a window and fire whatever you want to in the popup window, then
close it...not the most elegant, but likely your only solution. There's
likely a tutorial on it somewhere, google should help

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Vishal" <an*******@discussions.microsoft.com> wrote in message
news:12****************************@phx.gbl...
Hello,

is it possible to execute something when the browser
window is closed in asp.net?

Thanks

Nov 19 '05 #3
One way to achieve is to open a new window with asp.net page in javascript
unload event and run your asp.net code from that page and close that page
also after your code execution.

--
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"Vishal" <an*******@discussions.microsoft.com> wrote in message
news:12****************************@phx.gbl...
Hello,

is it possible to execute something when the browser
window is closed in asp.net?

Thanks

Nov 19 '05 #4

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

Similar topics

9
by: Pack Fan | last post by:
I've noticed that session variables will persist on Mac IE even after all browser windows have been closed. One must quit the program to clear the session variables. This presents a security risk...
2
by: Simon Fletcher | last post by:
Hello there, I need a "Close Window" script ( onLoad.Close.Window() ), however i need the script so it don't come up with this annoying window: "This window is trying to close" window. Is...
9
by: Graham | last post by:
What I currently have is a page that opens another browser at 800x600, once that is loaded I would like to close the orginal page down while keeping the page that it has just opened open (To make...
6
by: chon | last post by:
I have an ASP page that is sent a file location as a parameter. It opens this file, loads the ADODB.Stream object and does a binary write to the page forcing the download dialog to appear. This...
3
by: Isabel | last post by:
How can you close all child browser windows that where open by a parent browser window? I have links on a parent (main) page that opens the child page as a separate browser. However, I need to be...
4
by: Ron Lautmann | last post by:
I want to close a browser window so I created a Close button that does this: private void Button1_Click(object sender, System.EventArgs e) {...
7
by: Paul | last post by:
Hi I have a web application that has a log off selection, just redirects the browser to a form with a label displaying you are loging off. In part of the application I open a new window and was...
37
by: Jan Tovgaard | last post by:
Hey everyone:) We have a critical problem, which I can see that other people also has ran into. In Internet Explorer 7 it is no longer possible to do a window.close after opening a window,...
7
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed...
5
by: jimmy | last post by:
Hi all, I want to capture the event when the browser's close button is clicked in an html page. I tried using the event.ClientX and event.ClientY property in the body unload event, and this...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.