Umbraco is turning 5!
There's already 322 people signed up for the February 16th celebrations, what about you? join now

reloading a single node

7/2/2009 9:24:41 PMAvatarrah_135Location: Puneposts: 23Karma: 20

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

Thanks,

7/2/2009 11:42:47 PMAvatarRichard SoetemanLocation: 2102LB, The Netherlandsposts: 654Karma: 1289
Comment with ID: 8477
Response.Redirect("/umbraco/editContent.aspx?id=1048"); 

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

Cheers,

Richard

7/2/2009 11:50:47 PMAvatarNico LubbersLocation: wijchen, hollandposts: 134Karma: 126
Comment with ID: 8478

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

Please login or Sign up To post replies