J
jgdean14
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
Pages.
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
ContentPlaceHolder?
Am I missing something here? : )
Thanks in advance
jd
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
Pages.
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
ContentPlaceHolder?
Am I missing something here? : )
Thanks in advance
jd