I have a page that has a webtab control with 2 tabs. On the unload I have a prompt to alert the users that they have data unsaved when unload is called.
jQuery(window).bind('beforeunload', function(e) { return "Unsaved data." });
If you switch tabs and click on stay on this page the tab index still changes and the new tab does not load. Is there a way to restore the tabs to the original state before unload was called?
Hi dan2012a,
I suggest that you handle the SelectedIndexChanging client-side event and cancel it if the user choose certain option:
function SelectedIndexChangingdHandler(sender, eventArgs) {
var a = confirm("Unsaved data! Continue?");
if (!a) {
eventArgs.set_cancel(true);
}
Please let me know if this helps.
Thank you. That solved my problem and helped tremendously.