Search code examples
asp.netdundas

Dundas Chart in User Control


I have a dundas chart with ajax zooming and scrolling enable. It works fine in a webform page. But once I put in a user control and called it from another page I get this error -

the target 'ctl00$ContentPlaceHolder1$uc2$chartVisits' for the callback could not be found or did not implement ICallbackEventHandler.

-when I try to use the zoom and scroll functionality.

What can I do to resolve this problem. Thank You.


Solution

  • I've seen this error when dynamically adding controls that use AJAX. Make sure you're adding any controls in the OnInit method, or during the Page_Init event. That has solved this problem for me in the past.