Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programming UserControls
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01330659
Message ID:
01330677
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform