Persisting Custom Control's Child tag's values

X

xb

I am creating a webcontrol custom control using asp .net. I have the
parent control and within that control i am adding the children
controls using the contents of children tag. The children tag have
some of the properties that i am interested in during the roundtrip
between browser and server. The problem i am facing is that after the
user modifies the properties of these children control on browser/in
the code and posts back, the children properties are lost!!!. Here is
the pseudo code for what i am trying to do:

MyWebCtl webControl,INamingContainer
{

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content
),PersistenceMode(PersistenceMode.InnerDefaultProperty),NotifyParentProperty(true)]
public ItemCollection Items //Property containing the collection of
"children control property"

override protected void CreateChildControls(){...};

public override ControlCollection Controls{}

protected override void Render(HtmlTextWriter output){}

}

[TypeConverter(typeof(ExpandableObjectConverter))]
public class childrenTab(){} //This class contains all the properties
that i am interested in
Any help is appreciated.
Thanks
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top