?
Solved

User closes out Internet Explorer, what to do? use onbeforeunload?

Posted on 2008-01-25
1
Medium Priority
?
266 Views
Last Modified: 2008-03-10
If a user closes out of Internet Explorer by using the X in the top right corner, how can I prompt the user and ask them if they want to save or cancel the transaction?  If they want to save, I need to call a C# SaveValues() method, if they want to cancel, I need to call a C# RollBack() method.  Is this possible? Do I need a pop up?  I read dont use popups, because pop up blockers will cause them not to load.

Whats the best solution using asp.net 1.1, c#, javascript...

Thanks!
0
Comment
Question by:michael1174
1 Comment
 
LVL 11

Accepted Solution

by:
Isisagate earned 2000 total points
ID: 20745699
I would use onbeforeunload with a confirm("Do you want to save your data?")

then if it returns true execute an Ajax call to the server side code to call save otherwise execute RollBack
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question