Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a property on my document type advert and I have a user control that outputs the value of this property.
I want to recursivly select this property from the closest parent that has it set.
-- Home---- Page 1---- Sub Page 1
So in the above structure, sub page 1 would recurse up the tree till it finds a page with the property set and it would output that.
In xslt this gives me the node ID of the closest parent with the property set
$currentPage/ancestor-or-self::* [@isDoc and leftAdvert != ''][1]/leftAdvert
In c# I could just recurse up the tree but wonder if there is a better way to do this. Is there or should I just recurse.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Inherit property value closest parent c#
I have a property on my document type advert and I have a user control that outputs the value of this property.
I want to recursivly select this property from the closest parent that has it set.
-- Home
---- Page 1
---- Sub Page 1
So in the above structure, sub page 1 would recurse up the tree till it finds a page with the property set and it would output that.
In xslt this gives me the node ID of the closest parent with the property set
In c# I could just recurse up the tree but wonder if there is a better way to do this. Is there or should I just recurse.
is working on a reply...