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();
public virtual string ClientDialogHandler { get; set; }