How can I implement a notification or warning message in Wisej when a user attempts to close the browser or tab? Is there an event like onbeforeunload
in Wisej to handle this scenario? I using VB.NET Wisej Pro 3.5
i used the property
Public Class FrmMain
Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Application.EnableUnloadConfirmation = True
End Sub
End Class
And it succeeded in notifying when the user closes the browser, however, I want to execute additional command after the user selects Leave and exits the browser, which method should I call? Please help
Hi Nhan,
You can call this in Program.cs:
Application.Eval(@”window.addEventListener(‘beforeunload’, (event) => {
// Set the returnValue property to display a confirmation dialog
event.preventDefault(); // Some browsers require this call
event.returnValue = ”; // A string value is required in some browsers
});”);
Best Regards,
Alaa
Please login first to submit.