Author: davide128 | Posted on: 8/29/2010 8:56:20 PM | Views : 281

I took this line of control from this post http://forums.asp.net/t/1201593.aspx I'm actually trying to do the same dynamic accordion.
 
MyAccordion.ItemDataBound += new EventHandler<AccordionItemEventArgs>(MyAccordion_ItemDataBound); 
 
I converted to vb.net and this is the equivalent.
MyAccordion.ItemDataBound += New EventHandler(Of AccordionItemEventArgs)(MyAccordion_ItemDataBound)
when I type  that line in my code I get an error..
Error 3 'Public Event ItemDataBound(sender As Object, e As AjaxControlToolkit.AccordionItemEventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event. 
 
and
 
Error 4 Delegate 'System.EventHandler(Of AjaxControlToolkit.AccordionItemEventArgs)' requires an 'Addres ...

Go to the complete details ...