Accessing Controls contained in another Control from ASPX Page

  • Thread starter Thread starter Willy
  • Start date Start date
W

Willy

Hi All!

Is there any ways to get access to the controls contained in another user
controls from an ASP.NET page?

For example I have...

- User Control A
|_ User Control B (which uses User Control A)
|_ User Control C (which uses User Control B)
|_ ASPX page A (which uses User Control C)

So, is it possible for ASPX page A to get access to User Control A that is
contained in the User Control C (apart from exposing via a public property)
?

Any help or pointers are greatly appreciated!

Thank you all in advance.

willy
 
I have an article on this kinda thing:
http://www.openmymind.net/communication/index.html
but it'll just tell you to use a property...why you don't want to do this is
beyond me...

you can use FindControl(xxx).FindControl(xxxx).FindControl(xxxx) but that's
a horrible choice as (a) it's error prone (b) can easily break

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top