Copied to clipboard

Flag this post as spam?

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


  • Phong Nguyen Dinh 26 posts 197 karma points
    Sep 28, 2016 @ 14:00
    Phong Nguyen Dinh
    0

    Hi everyone i am a newbie in umbraco. I want to ask how can we get id of a note if we already get it? Thank you so much.

  • Paul Seal 524 posts 2889 karma points MVP 6x c-trib
    Sep 28, 2016 @ 14:15
    Paul Seal
    101

    Normally you would use .Id

    for example CurrentPage.Id

    or

    Umbraco.AssignedContentItem.Id

    Hope this helps.

  • Phong Nguyen Dinh 26 posts 197 karma points
    Sep 28, 2016 @ 15:33
    Phong Nguyen Dinh
    0

    Thank you so much Paul Seal. It works for me

  • Ion Bulgar 9 posts 79 karma points
    Sep 28, 2016 @ 15:40
    Ion Bulgar
    0

    Use uQuery:

    UmbracoHelper helper = new UmbracoHelper(UmbracoContext.Current);
    var nodeId = uQuery.GetNodesByType("docTypeAlias")
         .Select(elm => helper.TypedContent(elm.Id));
    
Please Sign in or register to post replies

Write your reply to:

Draft