Copied to clipboard

Flag this post as spam?

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


  • Mark Haskamp 3 posts 23 karma points
    Mar 23, 2010 @ 22:38
    Mark Haskamp
    0

    Get unpublished document's create date from a usercontrol

    I'd like to get the node CreateDate from within my .ascx file. The node is not published though so I can't use a NodeFactory.

    Thanks in advance,
    Mark

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 23, 2010 @ 23:09
    Dirk De Grave
    0

    Hi Mark,

    If you know the id of the document, use

    var doc = new Document(idOfDocument);
    var createDate = doc.CreateDateTime;

    Hope this helps.

    Regards,

    /Dirk

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 23, 2010 @ 23:18
    Dirk De Grave
    0

    But be aware of using this code snippet if you're working in the frontend, as it will hit your db more than you'd like it to...

     

    Cheers,

    /Dirk

  • Mark Haskamp 3 posts 23 karma points
    Mar 23, 2010 @ 23:56
    Mark Haskamp
    0

    Thanks for the solution and for the warning.

    --Mark

  • 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