Accessing Controls contained in another Control from ASPX Page

Discussion in 'ASP .Net Web Controls' started by Willy, Dec 21, 2004.

  1. Willy

    Willy Guest

    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
     
    Willy, Dec 21, 2004
    #1
    1. Advertising

  2. Willy

    Willy Guest

    anybody?

    willy

    "Willy" <> wrote in message
    news:...
    > 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
    >
     
    Willy, Dec 21, 2004
    #2
    1. Advertising

  3. Willy

    Karl Seguin Guest

    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

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Willy" <> wrote in message
    news:...
    > 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
    >
    >
     
    Karl Seguin, Dec 21, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sriram Mallajyosula

    How do I post data from aspx page to another aspx page.

    Sriram Mallajyosula, Nov 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,065
    Steve C. Orr [MVP, MCSD]
    Nov 5, 2003
  2. Willy
    Replies:
    2
    Views:
    571
    Karl Seguin
    Dec 21, 2004
  3. =?Utf-8?B?Uk1M?=
    Replies:
    1
    Views:
    593
    =?Utf-8?B?QW5keSBMdWtzaWM=?=
    Sep 16, 2005
  4. Willy
    Replies:
    2
    Views:
    167
    Karl Seguin
    Dec 21, 2004
  5. Warped
    Replies:
    2
    Views:
    544
    Warped
    Jul 15, 2005
Loading...

Share This Page