Displays a client side confirmation dialog a client event

Namespace:  EPiServer.ClientScript.Events
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236

Syntax

C#
public class ConfirmEvent : EventBase

Examples

Create a client side post confirmation event handler which takes an event argument and the confirmation result as parameters.
CopyC#
<script type="text/javascript">
function postConfirm(e, confirmResult){
    if (confirmResult==true)
        alert("The user confirmed");
}
<script>
Create a confirm event in C# with confirm condition which will be run before the confirmation dialog is shown and a post confirm function reference run once the user has either pressed "OK" or "Cancel" in the confirmation dialog.
CopyC#
ConfirmEvent confirmEvent = new ConfirmEvent(EventType.Click, 
    "Do you really want to delete this item?", 
    "document.getElementById('myCheckbox').checked == true", "postConfirm")

ScriptManager.AddEventListener(myControl, confirmEvent);

Inheritance Hierarchy

System..::.Object
  EPiServer.ClientScript.Events..::.EventBase
    EPiServer.ClientScript.Events..::.ConfirmEvent

See Also