Copied to clipboard

Flag this post as spam?

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


  • Raul Roa 18 posts 38 karma points
    Jan 04, 2010 @ 05:28
    Raul Roa
    0

    Setting a value to a node property

    I'd like to know how to set a value to a node property? It's Value property does not contain a setter.

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Jan 04, 2010 @ 08:38
    Richard Soeteman
    0

    HI,

    I assume your use the Node class from the NodeFactory which is a representation from the xml file. If you want to modify data you need the Document class in the umbraco.cms.businesslogic.web namespace

    Create a new Document object using doc = new Document( the document id);

    then assign the value using doc.getProperty("TheAlias").Value = "Your value";

    Hope it helps you,

    Richard

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 04, 2010 @ 08:40
    Dirk De Grave
    0

    Hi Raul,

    If you'd like to set a value to a property from c# code, use:

    myNode.getProperty("propertyAlias").Value = myValue;

     

    Cheers,

    /Dirk

  • millennium 2 posts 22 karma points
    May 26, 2012 @ 12:06
    millennium
    0

    node property is used in programming languages.it is the property of c# language.

  • 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