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


R

Ryan

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
 
Ad

Advertisements


Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top