943,928 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 1222
  • ASP.NET RSS
Jun 23rd, 2009
0

Notify alert message while navigating to other page

Expand Post »
Hi Friends,

I have a web Application created, there is an option to Add/Edit the forms.
My requirement is something like...
When a user opens any record for editing, the details are displayed(binded) in texboxes,dropdowns,radiobuttons.. etc
Here if the user modifies any data and clicks on any other link(within the same page) to move onto some other page without saving... promt him saying "You have modified the data, Do you wish to continue without saving Yes/No".

Any help is greatly appreciated...

Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 6
Light Poster
vizy is offline Offline
36 posts
since Dec 2007
Jun 23rd, 2009
0

Re: Notify alert message while navigating to other page

well, you can use a flag..
set the flag to one on click of "submit button" and otherwise let it be zero....

and onclick of each link call a function check()
which see's if the flag is 0 gives an alert otherwise
opens the link...
Reputation Points: 10
Solved Threads: 9
Junior Poster
aashishn86 is offline Offline
184 posts
since Jun 2008
Jun 23rd, 2009
0

Re: Notify alert message while navigating to other page

use can also compare the values in the databases and the current values in the textboxes and listboxes and see if the have changed !
Reputation Points: 10
Solved Threads: 9
Junior Poster
aashishn86 is offline Offline
184 posts
since Jun 2008
Jun 23rd, 2009
0

Re: Notify alert message while navigating to other page

thanks ashish for your post

I want to alert the user only if he modified some of the data(may be a character) and trying to move on other links.. otherwise let him go if no changes made... and by comparing the data from DB will take too long time to process...
Reputation Points: 10
Solved Threads: 6
Light Poster
vizy is offline Offline
36 posts
since Dec 2007
Jun 23rd, 2009
0

Re: Notify alert message while navigating to other page

Did you work out on that issue? Post your code.
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jun 24th, 2009
0

Re: Notify alert message while navigating to other page

Hi vizy its not an easy job. Scott Mitchell has written a post on this issue which is not 100% efficient but you can start & need to fix to accomodate your requirements.

http://www.4guysfromrolla.com/webtech/100604-1.shtml
Reputation Points: 26
Solved Threads: 44
Posting Whiz in Training
mail2saion is offline Offline
247 posts
since Apr 2009
Jun 24th, 2009
0

Re: Notify alert message while navigating to other page

Thank you friends form your replies...
hey mail2saion.. your link really helps..
I got the solution
Reputation Points: 10
Solved Threads: 6
Light Poster
vizy is offline Offline
36 posts
since Dec 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: SQLCacheDependency not notifying
Next Thread in ASP.NET Forum Timeline: How to use ScriptManager.RegisterClientScriptBlock





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC