I am trying to navigate to a different page, but before I can do this, a dialog appears (the IE "leave this page" or "stay on this page" dialog).
I would like to leave the page and go to an other URL.
I already tried several things; using the onbeforeunload handler and by using invoked keypresses. But I cannot get this to work on my test lists while running remotely.
OnBeforeUnloadDialog dialog = OnBeforeUnloadDialog.CreateOnBeforeUnloadDialog(ActiveBrowser, DialogButton.OK);
I also tried to use this.Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.HandleAndContinue;, because my testlist needs the global setting set at "Do not handle", but still no success.
And added the reference system.windows.forms to my project and to the cs file.
What am I missing here?