Copied to clipboard

Flag this post as spam?

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


  • Shaun 248 posts 475 karma points
    Nov 30, 2009 @ 12:36
    Shaun
    0

    Nodefactory not finding node data

    Hi.

    I have a .Net control that does the following

    using umbraco.presentation.nodeFactory;
    ...
    Node myNode = new Node(1100);
    lblTest.text = myNode.Id.ToString();
    lblTest2.text = myNode.GetProperty("umbracoBytes").value;
    lblTest3.text = myNode.Name;

    I've checked and the id is a valid one.

    However, lblTest and lblTest3 display nothing, and lblTest2 causes a crash with "object reference not set".

    I must be forgetting something basic but I can't see what.

    Any ideas?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Nov 30, 2009 @ 12:56
    Ismail Mayat
    1

    Shaun,

    I think nodefactory is for published content nodes, if you want media you will have to get new Media

    Regards

    Ismail

  • Shaun 248 posts 475 karma points
    Nov 30, 2009 @ 12:59
    Shaun
    0

    Aha! Thanks Ismail.

  • 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.

Please Sign in or register to post replies