I have a a node ID from my @Model.Id and I have a list of nodes from item.Children.Where("Visible") what i want to do is do a check to see if my @Model.Id is in my list.
I've tried to use @item.Descendents(@Model.ID) as my if statement, but I'm not sure that was working?
foreach (var item in parent.Children.Where("Visible"))
{
if (item.Children.Where("Visible").Count() > 0 && @Model.Lvel > 2 && @item.Descendents(@Model.Id))
{
//do stuff here
}
}
It's gonna be something silly, so any help would be appreciated
How do i check if a node is in a list of children
I have a a node ID from my @Model.Id and I have a list of nodes from item.Children.Where("Visible") what i want to do is do a check to see if my @Model.Id is in my list.
I've tried to use @item.Descendents(@Model.ID) as my if statement, but I'm not sure that was working?
It's gonna be something silly, so any help would be appreciated
Ravi
is working on a reply...