Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing User Control Class From Containing Page
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Accessing User Control Class From Containing Page
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01246707
Message ID:
01246707
Vues:
72
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform