N
Nathan
I am trying to implement something similar to a treeview in an asp.net usercontrol. As this control has no need to allow multiple branches to be expanded at the same time the easiest way to do this would be to make a datalist where the selected item is identical to the item template with the addition of another instance of the same control embedded in it.
like this
mycontrol
item1
item2
mycontrol
item1
etc...
I cannot however find a way to do this. Doing so declaritively causes a circular reference. I can use loadcontrol in the codebehind, but I am having trouble adding it to the datalistitem properly.
I would think this would be a fairly common thing to do but all controls like this I have found are custom servercontrols. There must be a way to have a control contain instances of it's own class.
Any help would be greatly appreciated.
Thanks
Nathan
like this
mycontrol
item1
item2
mycontrol
item1
etc...
I cannot however find a way to do this. Doing so declaritively causes a circular reference. I can use loadcontrol in the codebehind, but I am having trouble adding it to the datalistitem properly.
I would think this would be a fairly common thing to do but all controls like this I have found are custom servercontrols. There must be a way to have a control contain instances of it's own class.
Any help would be greatly appreciated.
Thanks
Nathan