> Using my custom control, I need to locate controls in the Content
> section - - I know that I can do something like:
[quoted text clipped - 6 lines]
> "Content" - - how can I look through any ContentPlaceholder on the page, no
> matter what it's ID is?
This question and the sample code is not making any sense. Any control
on a content page can be referenced directly from within that page no
matter what ContentPlaceHolder it is in.
Please clarify
Stan - 14 May 2008 22:29 GMT
> > Using my custom control, I need to locate controls in the Content
> > section - - I know that I can do something like:
[quoted text clipped - 12 lines]
>
> Please clarify
Sorry, forget that last post. On re-reading I can see you are trying
to write a generic method for a custom control to reference another
control (with a particular id) on the host page which may or may not
be a content page. The FindControl method returns immediate Child
controls but not controls within controls - if you see what I mean -
hence your problem and the need for an explicit reference to a known
instance of a ContentPlaceHolder (named "Content").
I think the answer is to iterate through the controls collection on
the master page and identify the ContentPlaceHolders using the
GetType() method for each for each control.
HTH