Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programming UserControls
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01330659
Message ID:
01330677
Vues:
22
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>Is it possible from inside the UserControl code behind to get a reference to the parent control (page, FormView, etc.)? Or this is impossible since we don't know in design time where the control is going to be placed?
>
>Thanks a lot in advance.
>

Yes, just use the Parent property. You can also get a reference to the Page via the Page property. If you have some custom and/or control interface or type you'll need to cast it to the correct type to access it's properties/methods.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform