adktd
asked on
Access user control property
Hi you experts.
I have a user control tha inside has 3 other user controls.For example lets say that the container control is called parent and the others uc1,uc2,uc3. Can you give me an example of how from uc3 i can retrieve the value of a property in uc1 ?
Thank you in advance.
I have a user control tha inside has 3 other user controls.For example lets say that the container control is called parent and the others uc1,uc2,uc3. Can you give me an example of how from uc3 i can retrieve the value of a property in uc1 ?
Thank you in advance.
ASKER
Yes i know,but how can i gain acess to user controls by using the parent container control's reference?
That kind of work should be done in the container, and not at the user control level, since it has a reference to all the user controls.
Bob
Bob
You can have the user control fire an event, which the parent page will consume -- and at that point you will have access to all children controls. I have a few demos that illustrate this. Take note that you can use "sender" (an object) to pass-back to the parent any information from the child control that is relevant:
My demo page, with downloads:
http://www.geocities.com/managebrinkster/consume_events.html
My demo page, with downloads:
http://www.geocities.com/managebrinkster/consume_events.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thank you
Bob