Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Keith Petersen 67 posts 111 karma points
    Oct 24, 2011 @ 18:07
    Keith Petersen
    0

    DynamicNodeWalker methods missing on a DynamicNode variable

    I'm running into a situation where a dynamicNode variable doesn't have the DynamicNodeWalker methods.

    dynamic startNode = @Model.AncestorOrSelf(3);

    I've verified startNode has children, but when I try @startNode.First().Id I get DynamicNull. I also get DynamicNull when I try @startNode.First().GetType().ToString() . Yet @startNode.Parent.Id works as expected. I think this is a variation of the problem I reported here: http://our.umbraco.org/forum/developers/razor/24951-Razor-best-practice-way-to-check-if-a-node-exists (Maybe I shouldn't have marked that as solved, since it's more of a workaround.)

Please Sign in or register to post replies

Write your reply to:

Draft