By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,439 Members | 1,917 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,439 IT Pros & Developers. It's quick & easy.

Referencing User controls from content pages using ContentPlaceHolders

P: n/a
Hi -

We have an Early .NET 2.0 App that was created without Master Pages
about a year ago. We opted for more of a MVC framework and dynamically-
loaded User Controls. We use Custom User-Controls extensively and are
currently researching on refactoring the project (WAP) to use Master

One challenge is the fact that since MasterPages are integrated with
content pages in the Init() stage, all of our references to User
Controls placed in Master ContentPlaceHolders have to be made by
traversing the Control tree using FindControl() in the Page's code-
behind class. This will lead to extensive reworking of UC code.

It seems that WebControls do not have this limitation and can be
declared/referenced directly by the Page even when they are placed in
the Master's ContentPlaceHolder.

I think I will be able to create a mechanism to help with traversing
the control tree whether it is in our User control Base class and or
the Page's Base Class. But I am wondering if anyone has dealt with
this before and if there is a way to allow User Controls to be
referenced directly from content Pages even if they are in a Master

Am I missing something here? : )

Thanks in advance

Nov 5 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.