Accessing Events from a UserControl added Programatically

C

Craig

I have a UserControl that is added programatically from a base page
class on to a sub page class in the following manner:

-------------------------------------------------------
// Load in the user control
this.oCtlUI0 = (WebPageHeader)LoadControl(WebAppConfig.AppHome +
WebAppConfig.WebPageUI0Path);

// Add it to a placeholder control on the ASPX page
((PlaceHolder)this.SubPage.FindControl("WebPageUI0")).Controls.Add((WebPageHeader)this.oCtlUI0);
-------------------------------------------------------

There is another user control nested in the WebPageHeader control that
has a menu. The menu control is added to the WebPageHeader control in
a traditional manner. This menu is a repeater control with databound
linkbuttons.

The problem is that when I execute the page, the ItemCommand event on
the repeater does not fire. The approprate delegate in in place to
link the event to the rptMeny_ItemCommand method in the codebehind of
the UserControl.

Do you have any ideas of how I can get these events to execute?
 

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,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top