Copied to clipboard

Flag this post as spam?

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


  • rah_135 23 posts 20 karma points
    Jul 02, 2009 @ 21:24
    rah_135
    0

    Reloading a single node

    I want to reload a single current node from a usercontrol. Can somebody help me with the exact code.

    Thanks,

  • Richard Soeteman 3875 posts 12037 karma points MVP
    Jul 02, 2009 @ 23:42
    Richard Soeteman
    0
    Response.Redirect("/umbraco/editContent.aspx?id=1048"); 

    Just replace the hardcoded id with Request.Querystring Id and I think that should work.

    Cheers,

    Richard

  • Nico Lubbers 151 posts 175 karma points
    Jul 02, 2009 @ 23:50
    Nico Lubbers
    0

    In the c# code of the usercontrol include the following namespace

    using umbraco.presentation.nodeFactory;

    Then you have access directly to the data of the currentNode:

            protected void Page_Load(object sender, EventArgs e)
            {
                Node node = Node.GetCurrent();
                string somevalue = node.GetProperty("field/alias-of-the-documenttype").Value;

                // do something with somevalue
            }

    Regards, Nico

  • 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