-
Prompt user to save data
Is there a working sample of how to prompt user to save data before leaving an ASP.NET web page? Particularly apply to autopostback controls and composite usercontrols. Thanks.
-
Not really
How I did it was using Javascript and every field called a function CheckDirty which set a dirty flag when changed and when it went to post back the event in the body BeforeUnload I check the flag and ask a question about saving.
-
Prompt user to save data
You can always use the following from the codebehind:
for example if you have a delete button and you want to confirm the delete:
this.deleteButton.Attributes.Add("onclick","return confirm('Are You Sure You Want to Delete?');");
If the user presses No, then in your client side jscript you just return with a false, otherwise you return true, causing a postback event which processes the delete function.
Hope that helps.
Romel Evans
Similar Threads
-
By Ervin Rodriguez in forum Database
Replies: 1
Last Post: 05-16-2003, 08:45 AM
-
Replies: 0
Last Post: 03-26-2003, 02:17 PM
-
By Paulo Costa in forum VB Classic
Replies: 0
Last Post: 07-30-2001, 05:15 PM
-
By GregO in forum VB Classic
Replies: 0
Last Post: 12-29-2000, 03:59 PM
-
By kumar72 in forum VB Classic
Replies: 0
Last Post: 03-24-2000, 07:06 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks