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 guys,
Does anyone know why this isnt working?
var uniCode = 1337; var result = CurrentPage.AncestorOrSelf(1).Descendants("brandAdvocate").Where(("University==@uniCode");
But this is: var result = CurrentPage.AncestorOrSelf(1).Descendants("brandAdvocate").Where(("University==1337"));
Thanks in advanced!
Try Where("University=@0", uniCode) instead. I also think you have one to many "(" after Where.
Appears to be an extra ( after .Where
.Where("University==@uniCode") not .Where(("University==@uniCode");
Have you considered using LINQ?
var a = 1337; var result = Model.Content.AncestorOrSelf(1).Descendants("brandAdvocate").Where(x => x.GetPropertyValue<int>("Unviersity")== a);
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
AncestorOfSelf
Hi guys,
Does anyone know why this isnt working?
var uniCode = 1337; var result = CurrentPage.AncestorOrSelf(1).Descendants("brandAdvocate").Where(("University==@uniCode");
But this is:
var result = CurrentPage.AncestorOrSelf(1).Descendants("brandAdvocate").Where(("University==1337"));
Thanks in advanced!
Try Where("University=@0", uniCode) instead. I also think you have one to many "(" after Where.
Appears to be an extra ( after .Where
.Where("University==@uniCode") not .Where(("University==@uniCode");
Have you considered using LINQ?
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.