Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In am asp.net page with a wizard control I have a part of javascript with the use of
JavaScript
window.onbeforeunload
.

This code prevents that people that use the backspace code leave the wizard unexpected.
In that last step
C#
(StepType="Complete")
I want the function removed. How to do this?
Posted

1 solution

in the end it was pretty simple:
Page.ClientScript.RegisterStartupScript(Page.GetType(), "cancelOnBefore", " window.onbeforeunload = null;", true);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900