HELP! STUCK! HOW DO I EXPOSE ALL PROPERTIES OF A CHILD CONTROL

Discussion in 'ASP .Net Web Controls' started by Ryan, Mar 23, 2007.

  1. Ryan

    Ryan Guest

    I am trying to create a control and would like to use the login
    control as a child control. This is one of several children. I want
    to expose ALL properties of the login control. I thought I might be
    able to simple declare my login control as PUBLIC, and this certainly
    results in it showing up in the designer. Unfortunately, any changes
    I make to the properties of my child control do not stay should I
    either switch to source view or compile and display my page in the
    browser. My next thought was to create a propery that would return a
    login control:

    <Browsable(True), Bindable(True),
    NotifyParentPropertyAttribute(True),
    PersistenceMode(PersistenceMode.Attribute),
    DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
    Category("LoginControl"), Description("LoginControl")> _
    Public Property LoginControl() As Login
    Get
    EnsureChildControls()
    Return _LoginControl
    End Get
    Set(ByVal value As Login)
    EnsureChildControls()
    _LoginControl = value
    End Set
    End Property

    This also did not work. There is a drop down menu that would appear
    next to my property with a (none) option. By changing some of the
    settings above, twice I got it to actually show "Login1" though I have
    no idea how to replicate that behavior.

    >From what I have read online, it seems people just recommend writing a

    property for every single control. This seems horribly tedious when
    someone went through all the trouble to include the properties in the
    control already.

    Is this my only option or am I doing something wrong?

    Thanks,
    Ryan
     
    Ryan, Mar 23, 2007
    #1
    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. Jeff Rodriguez
    Replies:
    23
    Views:
    1,141
    David Schwartz
    Dec 9, 2003
  2. Composite Control - How to Expose a Child Control

    , Sep 28, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    132
  3. Replies:
    0
    Views:
    159
  4. Donal McWeeney

    Mixing child properties and child controls - how?

    Donal McWeeney, Feb 10, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    127
    [MSFT]
    Feb 14, 2005
  5. Replies:
    0
    Views:
    151
Loading...

Share This Page