Copied to clipboard

Flag this post as spam?

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


  • Lee 1130 posts 3088 karma points
    Jul 17, 2010 @ 13:54
    Lee
    0

    Usercontrol DataType - Get Node Properties?

    Can a usercontrol datatype get the nodeid of the node it is currently attached to?  What I mean is if I add my datatype/property to a page called 'Information' would my usercontrol datatype have access to the nodeid of 'information'?

  • Simon Justesen 436 posts 203 karma points
    Jul 17, 2010 @ 14:47
    Simon Justesen
    0

    Isn't the id available from umbraco.Presentation.NodeFactory.Node.Id or alternatively umbraco.Presentation.NodeFactory.Node.GetCurrent? 

  • skiltz 501 posts 701 karma points
    Jul 17, 2010 @ 14:51
    skiltz
    2

    You can get the nodeid by using Request["id"]

  • Lee 1130 posts 3088 karma points
    Jul 18, 2010 @ 09:56
    Lee
    0

    @Simon - I wasn't sure if this was only available in the front end

    @Skiltz - Thanks if I can't use GetCurrent etc.. I'll be using that :)

  • Simon Justesen 436 posts 203 karma points
    Jul 19, 2010 @ 03:15
    Simon Justesen
    0

    Lee, I think the nodefactory-way only works in the frontend, so you can skip ahead and use Request["id"] like Skiltz proposes :)

    EDIT: haha! and I think you already did ;-)

Please Sign in or register to post replies

Write your reply to:

Draft