472,989 Members | 3,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Prompt user to save changes before navigating away.

Hi,

In an ASP.NET application I have tried using javascript to prompt a user to
save their changes if they try and navigate away without saving their
changes. The problem is that this client-side solution is not reliable under
different browser-sets. Does anyone know of a robust server-side solution to
this problem? Or can anyone at least point me in the right direction because
I am having great difficulty with it.

Thanks in advance.
Jul 21 '05 #1
1 2873
Hello Rufus,

Firstly, I would like to tell you that it is not feasible to have
a generic solution for across browsers due to the limitations of
Javascript.

So, what you can do is to write the code for one browser and write the code
for
it in the Session Expire event of Global.ascx.I suggest Internet Explorer as
it is the
most popular and widely used browser.

HTH

Mona[Grapecity]

"rufus" <ru***@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
Hi,

In an ASP.NET application I have tried using javascript to prompt a user
to
save their changes if they try and navigate away without saving their
changes. The problem is that this client-side solution is not reliable
under
different browser-sets. Does anyone know of a robust server-side solution
to
this problem? Or can anyone at least point me in the right direction
because
I am having great difficulty with it.

Thanks in advance.

Jul 21 '05 #2

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

Similar topics

3
by: sancha | last post by:
Hi, I need to promt the user when he moves away from the page by clicking an of the links available on the page. I was trying to use the onbeforeunload function but it seems it is a jScript...
2
by: icedgar | last post by:
am using the following script in the BeforeUpdate area of a main form. Private Sub Form_BeforeUpdate(Cancel As Integer) Dim strMsg As String strMsg = "Do you wish to save your changes?" If...
0
by: tafs7 | last post by:
Hello, I have a custom datagrid control that works great. But I was thinking about adding some functionality to it. Currently, I use the datagrid to display one record at a time, and with item...
3
by: Weston Weems | last post by:
Ok, I've posted on this before, lemme give you guys the run down. I've got an asp form that has postbacks etc. I'd like it so that when navigating away from it, It'll prompt user for save...
4
by: markalroberts | last post by:
Hi, I wish to ask warn the user that there are unsaved changes (if there are) and allow them to cancel navigating away/closing the browser. Investigation leads me to believe the...
1
by: rufus | last post by:
Hi, In an ASP.NET application I have tried using javascript to prompt a user to save their changes if they try and navigate away without saving their changes. The problem is that this...
11
by: John J. Hughes II | last post by:
I have a DataGridView displaying data from a DataSet. To the right of that I have a custom user control which displays one of the data set fields. The custom user control is bound to the data set...
4
by: ARC | last post by:
Hello all, I didn't use to have this problem in Access 97, but in 2007 (and maybe other versions of access after 97), if you have a form that has a subform, and you click the close button, you...
2
by: vibee | last post by:
fairly simple question but dont know how to do it...how do i prompt the user to ensure that the user wants to save changes made to an entry. thanks
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.