G
Guest
Hi,
Could anybody point me in the direction of how to dynamically allocate
an event handler for the custom event of a user control (I'm currently
using VB.NET under .NET 2.0 on Visual Studio 2008 developing a web
application)? I'm starting to tear my little remaining hair out!
I have a user control which contains an event (NavListEventArgs is
derived from EventArgs)...
Public Event NavClick(ByVal sender As Object, ByVal args As
NavListEventArgs)
I have an .aspx page which has the following event handler in the code-
behind...
Protected Sub navList_Click(ByVal sender As Object, ByVal args As
NavListEventArgs)
How do I get the "OnNavClick" (in the following control definitions)
to wire-up the "NavClick" event to the "navList_Click" event handler??
<uc1:NavList runat="server" id="nav1" OnNavClick="navList_Click"/>
<uc1:NavList runat="server" id="nav2" OnNavClick="navList_Click"/>
I'm familiar with the "AddHandler xx.xx, AddressOf xx", but I don't
want to have that restriction.
Many thanks for any advice,
Tom
Could anybody point me in the direction of how to dynamically allocate
an event handler for the custom event of a user control (I'm currently
using VB.NET under .NET 2.0 on Visual Studio 2008 developing a web
application)? I'm starting to tear my little remaining hair out!
I have a user control which contains an event (NavListEventArgs is
derived from EventArgs)...
Public Event NavClick(ByVal sender As Object, ByVal args As
NavListEventArgs)
I have an .aspx page which has the following event handler in the code-
behind...
Protected Sub navList_Click(ByVal sender As Object, ByVal args As
NavListEventArgs)
How do I get the "OnNavClick" (in the following control definitions)
to wire-up the "NavClick" event to the "navList_Click" event handler??
<uc1:NavList runat="server" id="nav1" OnNavClick="navList_Click"/>
<uc1:NavList runat="server" id="nav2" OnNavClick="navList_Click"/>
I'm familiar with the "AddHandler xx.xx, AddressOf xx", but I don't
want to have that restriction.
Many thanks for any advice,
Tom