I have successfully implemented an ICallbackEventHandler but so far I have only been able to do so at the Page level for the most part. That is:
MyCustomPage: System.Web.UI.Page, System.Web.UI.WebControls.ICallbackEventHandler {
// code goes here
}
I have tried to implement only in the Controls on the page(1 at the moment) that will actually handle the callback event but it seems impossible to do. For instance:
MyCustomDropDownList: System.Web.UI.WebControls.DropDownList, System.Web.UI.WebControls.ICallbackEventHandler {
}
I have seen code examples which simply pass the name of the control in the "args" parameter of the WebForm_doCallback() method. But this seems like a bit of a hack.
I guess I am just looking for thoughts on the validity of using the actual "Page" as the callbackEventHandler versus specific controls. What are the pros and cons(if any) of each method.