Click or drag to resize

JSHelperDirtyConfirm Method (String, String)

Generate javascript for use in an onclick handler to determine whether the current page is dirty and, if so, to confirm that the user wants to abandon their changes. Normally this script is prepended to any other javascript that may be performed. If the only action involved is a navigation via an anchor tag then typically this script is sufficient by itself. Typically you should use the DirtyConfirm(String) overload which uses window as the window symbol unless you know you need to refer to the window differently.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static string DirtyConfirm(
	string message,
	string win
)

Parameters

message
Type: SystemString
The confirmation message, appropriate for use in a javascript confirm popup.
win
Type: SystemString
The literal javascript symbol to be used to refer to the window be abandoned if the user confirms.

Return Value

Type: String
Dirty test and confirmation script.
See Also