I am trying to access a user control class, for a user control that is loaded dynamically, from the containing page. I have been able to access Web controls in the user control, but so far I have been unable to expose the user control class itself. I'm guessing that I need to set up an interface, but I am not sure how to accomplish this.
Here is the code that loads the user control:
protected void Page_Init(object sender, EventArgs e)
{
UserControl bottomPanel = (UserControl) LoadControl("~/Reviews.ascx");
bottomPanel.ID = "Reviews_ascx";
PlaceholderUserControl.Controls.Add(bottomPanel);
}
----
Here is how I access Web controls in the user control:
PlaceholderUserControl.Controls[0].FindControl("radReview");
----
I need to pass a query parameter to the MM.NET business class, that is registered with the control. The control is a Telerik TabStrip containing an mmDatalist. The query determines what data appears in the datalist. Any help is appreciated.
Regards,
Fred Chateau