Client side event handler that is called whenever a click event occurs anywhere inside of the modal dialog.

Client handler is a jQuery event handler and receives this as the element clicked plus the standard jQuery event object. You can check id and match against specific control ids:

if (id == "btnClose") doA(); if (id == "btnCancel") doB();