Copied to clipboard

Flag this post as spam?

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


  • Pinal Bhatt 298 posts 390 karma points
    Dec 18, 2012 @ 22:22
    Pinal Bhatt
    0

    DynamicNode.<alias> not working in U4.11.1

    Hi community

    I have following code:

    DynamicNode dNode = new DynamicNode(1247);
    <div>@dNode.title</div>

    But it does not works. I get following error on second line: CS1061: 'umbraco.MacroEngines.DynamicNode' does not contain a definition for 'title' and no extension method 'title' accepting a first argument of type 'umbraco.MacroEngines.DynamicNode' could be found (are you missing a using directive or an assembly reference?)

    On the other hand if i run following code i can see an alias named "title"

    DynamicNode dNode = new DynamicNode(1247);
    var ll = dNode.PropertiesAsList;
    foreach(var l in ll)
    {
    <div>@l.Alias</div>
    }
    Please help .
    Thanks & Regards
    Pinal Bhatt

  • Pinal Bhatt 298 posts 390 karma points
    Dec 20, 2012 @ 14:53
    Pinal Bhatt
    0

    Hi Community... any help please.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 20, 2012 @ 15:25
    Jeroen Breuer
    100

    Try this:

    dynamic dNode = new DynamicNode(1247);
    <div>@dNode.title</div>

    Jeroen

  • Pinal Bhatt 298 posts 390 karma points
    Dec 30, 2012 @ 14:29
    Pinal Bhatt
    0

    This one worked. Thanks a lot Jeroen.

Please Sign in or register to post replies

Write your reply to:

Draft