I'm confused why I'm not able to get the values from a checkbox list property. I'm getting this error like there's no data.
object reference not set to an instance of an object
So the code looks like this:
var rootPage = Umbraco.TypedContentAtRoot().FirstOrDefault(x => x.ContentType.Alias.Equals("kund_unikum_master_d"));
var test = rootPage.Descendants().Where(x => x.HasProperty("areaOfInterest")).FirstOrDefault();
@foreach (var item in test.GetPropertyValue<IEnumerable<string>>("areaOfInterest"))
{
<span>@item</span>
}
I'm correctly getting the first node with the property present with:
Not getting values from checkbox list
Hi,
I'm confused why I'm not able to get the values from a checkbox list property. I'm getting this error like there's no data.
So the code looks like this:
I'm correctly getting the first node with the property present with:
Hi!
Do you have a stack trace for the error?
What if you do
is working on a reply...