G
Gaurav Vaish
Hi,
I want to have a control that can have children like:
<prefix
arent ... runat="server">
<Children>
<prefix:Child .... runat="server"/>
</Children>
</prefix
arent>
When I try to launch the page, it gives me error that:
"Children" does not have a property named "prefix:Child". Where am I
missing?
I also tried by having a custom-"ControlBuilder", but then it seemed I
required a CCB for both Children as well as Child requiring both of them to
be Control's. There's something that I'm missing... unable to track what.
---------------------------------
I have create the classes as follows:
[ParseChildren(false)]
Parent : WebControl, IStateManager
{
....
Children Children { get { return this.children; } }
}
Children : IEnumerable, IStateManager
{
...
Child this[int] { get; set; }
Add(Entry e) { ... }
Remove(Entry e) { ... }
Clear() { ... }
IEnumerator GetEnumerator() { ... }
// IStateManager members ....
}
Child : WebControl
{
}
I want to have a control that can have children like:
<prefix
<Children>
<prefix:Child .... runat="server"/>
</Children>
</prefix
When I try to launch the page, it gives me error that:
"Children" does not have a property named "prefix:Child". Where am I
missing?
I also tried by having a custom-"ControlBuilder", but then it seemed I
required a CCB for both Children as well as Child requiring both of them to
be Control's. There's something that I'm missing... unable to track what.
---------------------------------
I have create the classes as follows:
[ParseChildren(false)]
Parent : WebControl, IStateManager
{
....
Children Children { get { return this.children; } }
}
Children : IEnumerable, IStateManager
{
...
Child this[int] { get; set; }
Add(Entry e) { ... }
Remove(Entry e) { ... }
Clear() { ... }
IEnumerator GetEnumerator() { ... }
// IStateManager members ....
}
Child : WebControl
{
}