Confirmation of Exit
-
We have a system requirement for an ASP.NET application to prompt the user to save any changes before leaving the page. This is in a system with 30+ pages that are editable. We're multi-tiered, and all of our pages inherit from a base page, where we are able to put common functionality. Additionally, we have our own navigation 'toolbar', from which users can save the page that they're on, navigate to other pages within the application, etc. This toolbar is in a separate frame from the editable windows. So, specifically, if a page has a combination of controls, such as a text box, a drop-down list, and maybe a couple of checkboxes, can we mark the page as "changed" when the user interacts with those controls? Can this be done in a central location for all pages or does it have to be on a per-control basis? I had thought maybe monitoring the state bag on the page between Postbacks would work, but didn't want to explore that too deeply if someone has a better idea. We would really rather not have to change every page in our application if there's a way to do this cheaply. "Forgetting what is behind and straining toward what is ahead, I press on toward the goal to win the prize for which God has called me heavenward"
-
We have a system requirement for an ASP.NET application to prompt the user to save any changes before leaving the page. This is in a system with 30+ pages that are editable. We're multi-tiered, and all of our pages inherit from a base page, where we are able to put common functionality. Additionally, we have our own navigation 'toolbar', from which users can save the page that they're on, navigate to other pages within the application, etc. This toolbar is in a separate frame from the editable windows. So, specifically, if a page has a combination of controls, such as a text box, a drop-down list, and maybe a couple of checkboxes, can we mark the page as "changed" when the user interacts with those controls? Can this be done in a central location for all pages or does it have to be on a per-control basis? I had thought maybe monitoring the state bag on the page between Postbacks would work, but didn't want to explore that too deeply if someone has a better idea. We would really rather not have to change every page in our application if there's a way to do this cheaply. "Forgetting what is behind and straining toward what is ahead, I press on toward the goal to win the prize for which God has called me heavenward"
Check out this article[^] by Scott Mitchell from 4GuysFromRolla.com, the shows you how to prompt a user to save before leaving a web page. ~Javier Lozano
-
We have a system requirement for an ASP.NET application to prompt the user to save any changes before leaving the page. This is in a system with 30+ pages that are editable. We're multi-tiered, and all of our pages inherit from a base page, where we are able to put common functionality. Additionally, we have our own navigation 'toolbar', from which users can save the page that they're on, navigate to other pages within the application, etc. This toolbar is in a separate frame from the editable windows. So, specifically, if a page has a combination of controls, such as a text box, a drop-down list, and maybe a couple of checkboxes, can we mark the page as "changed" when the user interacts with those controls? Can this be done in a central location for all pages or does it have to be on a per-control basis? I had thought maybe monitoring the state bag on the page between Postbacks would work, but didn't want to explore that too deeply if someone has a better idea. We would really rather not have to change every page in our application if there's a way to do this cheaply. "Forgetting what is behind and straining toward what is ahead, I press on toward the goal to win the prize for which God has called me heavenward"
Sorry, I over this other article[^] in which he, Scott, shows you how to do this in ASP.NET. ~Javier Lozano
-
Sorry, I over this other article[^] in which he, Scott, shows you how to do this in ASP.NET. ~Javier Lozano