Copied to clipboard

Flag this post as spam?

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


  • Bex 444 posts 555 karma points
    Mar 05, 2012 @ 12:56
    Bex
    0

    Get DocumentId from a Custom Datatype

    Hi

    I have created a custom usercontrol datatype using "umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor"

    I want to load a some stuff out of my database related to my current documentId but I'm not sure how to do this.

    I have tried 

     Node currentNode = Node.GetCurrent();

    But I am getting an error. 

    Is there a way of doing this?

    Bex

  • Rodion Novoselov 694 posts 859 karma points
    Mar 05, 2012 @ 13:05
    Rodion Novoselov
    0

    Hi. You can get it from the query string "id" parameter. Like:

     var docId = Convert.ToInt32(QueryString["id"]);

     

  • Bex 444 posts 555 karma points
    Mar 05, 2012 @ 13:11
    Bex
    0

    Thank you! 

    Daft moment! I remember now!

  • 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