I have dialog tha contains a partialview.
Is it possible to undo changes that the user makes inside the dialog, if the user decides to cancel the dialog and not to save?
If the user now opens the same dialog the changes are still there even if the user cancelled the dialog.
I know that its possible to call the controller and replace the partial view.
Is there any other way?
sanke – you could store the contents of the div in a .data() element when the partialview is first loaded. Then, if it’s cancelled (without saving), just push the .data() back in to div that was created for the dialog.
actions speak louder than words:
then on the cancel you could do the reverse:
give it a try…