Client handler is a jQuery event handler and receives this as the element clicked plus the standard jQuery event object. You can check this.id and match against specific control ids:
if (this.id == "btnClose") doA(); if (this.id == "btnCancel") doB();
public virtual string ClientDialogHandler