Hello everybody.
Can anyone help me? I'm writing a server control which raises events. On
MSDN I've read a lot about events and saw a bunch of samples illustrating
the mechanism of events. Among those samples I've saw a couple of ones on
which built-in ASP.NET controls featured event initialization right from
ASCX/ASPX code. For example:
<asp:Repeater id="rptMyRepeater" OnItemDataBound="OnMyRepeaterDataBind"
runat="server">
....
</asp:Repeater>
The piece of interest is the OnItemDataBound property. The documentation
says that it initializes the ItemDataBound event for the control. Does
anybody know how to implement this behavior so that the name of the event
handler is supplied in the attribute value? Suppose I'm having a control
nmsp:MyControl which raises the TestEvent event. What should I do to make
this syntax work:
<nmsp:MyControl id="ctlMyControl" runat="server"
OnTestEvent="OnMyControlTestEvent" />
?
Any hint/reference/sample will be appreciated
Thanks,
Kirill Osipov