Copied to clipboard

Flag this post as spam?

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


  • Jing Ling 9 posts 29 karma points
    Oct 28, 2009 @ 10:40
    Jing Ling
    0

    How can user control retreive document property

    Hi All. I am using Umbraco 4.0.2.1. Currently I am developing a.Net user control and a document ID will be passed to it. So how can I retrieve all its properties by using its id? I know xslt can do this but do not know how user control do it?

    Thank you

    Jing

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Oct 28, 2009 @ 10:54
    Richard Soeteman
    2

    Hi Jing,

    You can use the umbraco.presentation.nodeFactory.Node class for this. You can use umbraco.presentation.nodeFactory.Node.GetCurrent() to get the current node or new umbraco.presentation.nodeFactory.Node(nodeId) to get a specific node.

    On the node you can access the property using node.GetProperty(propertyAlias). or all properties via node.Properties

    Hope this helps you,

    Richard

     

  • Jing Ling 9 posts 29 karma points
    Nov 02, 2009 @ 09:25
    Jing Ling
    0

    thanks Richard. you solved my problem

  • 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