While implementing Client Script Call Back, you may receive the error
"The target '__Page' for the callback could not be found or did not implement ICallbackEventHandler." This error occurs, if you miss to specify the ICallBackEventHandler Interface in your Page Inheritance.
The typical Code behind class for an ASP.NET 2.0 Webform looks as below:-
public partial class _Default : System.Web.UI.Page However, in the case of implementing Client Script Call Back, we also need to specify the Interface as follows:-
public partial class _Default : System.Web.UI.Page, ICallbackEventHandler This specifies that the page implements ICallBackEventHandler interface and can implement client side scripting call backs to the server side code.
This setting might just be overlooked when we create the page since, the partial class declaration code is added by default and we always resort
to start writing our code from the Page_Load event and other events and dont interfere with the auto generated code such as the class definition. The ICallbackEventHandler is not added by default. It has to be explicitly specified as mentioned above.
ranganh
Star
12085 Points
2435 Posts
Microsoft
ASP.NET 2.0 - "The target '__Page' for the callback could not be found or did not implement ICall...
Jan 12, 2006 11:38 AM|LINK
This error occurs, if you miss to specify the ICallBackEventHandler Interface in your Page Inheritance.
The typical Code behind class for an ASP.NET 2.0 Webform looks as below:-
public partial class _Default : System.Web.UI.Page
However, in the case of implementing Client Script Call Back, we also need to specify the Interface as follows:-
public partial class _Default : System.Web.UI.Page, ICallbackEventHandler
This specifies that the page implements ICallBackEventHandler interface and can implement client side scripting call backs to the server side code.
This setting might just be overlooked when we create the page since, the partial class declaration code is added by default and we always resort to start writing our code from the Page_Load event and other events and dont interfere with the auto generated code such as the class definition. The ICallbackEventHandler is not added by default. It has to be explicitly specified as mentioned above.
This would resolve your issue.
Harish
http://geekswithblogs.net/ranganh