Create a property that is a usercontrol

Discussion in 'ASP .Net' started by Rex the Strange, Dec 5, 2006.

  1. Hi All,

    Is it possible to create a property in a usercontrol that is a
    reference to another usercontrol so that you could say (for example):

    <user:control1 id='control1' runat='server' />

    <user:control2 id='control2' runat='server' othercontrol='control1' />

    ???

    tia,
    rts
    Rex the Strange, Dec 5, 2006
    #1
    1. Advertising

  2. Rex the Strange

    Masudur Guest

    Rex the Strange wrote:
    > Hi All,
    >
    > Is it possible to create a property in a usercontrol that is a
    > reference to another usercontrol so that you could say (for example):
    >
    > <user:control1 id='control1' runat='server' />
    >
    > <user:control2 id='control2' runat='server' othercontrol='control1' />
    >
    > ???
    >
    > tia,
    > rts



    Hi,

    I am sure about keeping other controls reference in code .... Because i
    used it many times.
    But never need to use in html...

    ///in user control....
    private UserControl _userControl;

    public UserControl OtherControl
    {
    get { return _userControl; }
    set { _userControl = value; }
    }

    ///in master page....
    Footer1.OtherControl = Header1;

    Masudur
    Kaz Software Ltd
    www.kaz.com.bd
    Masudur, Dec 5, 2006
    #2
    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. huobazi
    Replies:
    1
    Views:
    666
    David Waz...
    Jul 3, 2003
  2. Rajesh Tiwari

    Can we use a usercontrol inside a usercontrol

    Rajesh Tiwari, Aug 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    396
    Rajesh Tiwari
    Aug 12, 2003
  3. nail
    Replies:
    0
    Views:
    1,526
  4. Phl
    Replies:
    2
    Views:
    508
    =?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?=
    Nov 18, 2004
  5. Fabiano
    Replies:
    2
    Views:
    579
    =?Utf-8?B?c3Jpbmk=?=
    Jun 3, 2005
Loading...

Share This Page