vrijdag, december 30, 2005

 

watch ur step when creating webcontrols on the fly

I ran into a nasty problem. When you know the solution its easy, but when you see this error description at first you might be puzzeld like i was. I was initialising a treeview in the
Page_Prerender event of the page, works fine (Dont ask me how it got there in the first place :-) ). Now, when i tryed to open the tree in 'runtime' i kept getting this error: "The target 'ctl00$ContentPlaceHolder2$ctl01' for the callback could not be found or did not implement ICallbackEventHandler." Somehow some Javascript stuff doesnt get generated i guess when creating the control in this stage of creating the page. Simple solution, move the creation to the
Page_Load event..