A user control has a Page property you can use to get to the Page
containing the control.
WebForm1 form1 = (WebForm1)this.Page;
If the page then exposes the user controls as public properties or as
public fields (as you have done, it appears), you can reach them
through the page reference:
UC2 uc2 = form1.UC2
or
UC2 uc2 = ((WebForm1)this.Page).UC2;
HTH,
--
Scott
http://www.OdeToCode.com/
On Thu, 30 Sep 2004 12:55:06 +0300, qwerty <> wrote:
>I have two User controls in a page.
>Them ID-propertys are example UC1 and UC2.
>
>In code behind file they are declared:
> Public UC1 As UC1
> Public UC1 As UC1
>
> From the page I can call them with their name (UC1 and UC2) and access
>their public propertys and functions.
>
>How can I access the page from a user control?
>How can I access another user control from another one?