Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing User Control Class From Containing Page
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Accessing User Control Class From Containing Page
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01246707
Message ID:
01246707
Views:
71
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
Next
Reply
Map
View

Click here to load this message in the networking platform