If I set enableModifiedFlag property to true on my Custom Control; I see the following code at the bottom of generated Page source.
Everything works fine when user m
On click of the button, use below CSJS: XSP._setDirty(false,"") That'll make the document as non dirty and let user navigate to other page.
XSP._setDirty(false,"")