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
Hi,
I'm trying to filter nodes that have a property (researchFeatured) of datatype 'True/false' checked.
my razor looks like this:
DynamicNode featuredResearch = @Model.AncestorOrSelf().Descendants("ResearchProjectArea").Where("featuredResearch").First();
'(featuredResearch).GetChildrenAsList threw an exception of type System.NullReferenceException'
how can I solve this, all I want to do is get researchProject nodes that have their 'featuredResearch' property checked.
Thanks for your help,
Anthony
solved it:
DynamicNode featuredResearch = @Model.AncestorOrSelf().Descendants("ResearchProject").Where("researchFeatured").First();
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
problem with Razor Where clause
Hi,
I'm trying to filter nodes that have a property (researchFeatured) of datatype 'True/false' checked.
my razor looks like this:
DynamicNode featuredResearch = @Model.AncestorOrSelf().Descendants("ResearchProjectArea").Where("featuredResearch").First();
'(featuredResearch).GetChildrenAsList threw an exception of type System.NullReferenceException'
how can I solve this, all I want to do is get researchProject nodes that have their 'featuredResearch' property checked.
Thanks for your help,
Anthony
solved it:
DynamicNode featuredResearch = @Model.AncestorOrSelf().Descendants("ResearchProject").Where("researchFeatured").First();
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.