WebControl inside of WebControl and attaching events

K

Kasabaarde Sumta

I have built a navigation custom web control that I have been placing on
various pages without issue. When one of the image buttons within the
control is clicked , a CommandEvent is raised on the control itself. I
Handle that event on in a Sub on the codebehind on which the page resides.

Today, I am attempting to place that navigation control within a larger
control. The larger control is a dashboard into some tables in my database.
So what I am trying is in the constructor for the dashboard I am assigning
the event to trigger the function, but the function seems to never be called.

How off base I am in this approach and can someone put me on track?

portNavBar.CommandEvent +=new NavBar.Command(portNavBar_CommandEvent);

private void portNavBar_CommandEvent(object sender, CommandEventArgs e)
{
CurrentPage = CurrentPage + 1;
ViewerRole="bob";
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top