Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I want to reload a single current node from a usercontrol. Can somebody help me with the exact code.
Thanks,
Response.Redirect("/umbraco/editContent.aspx?id=1048");
Just replace the hardcoded id with Request.Querystring Id and I think that should work.
Cheers,
Richard
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
is working on a reply...
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.
Continue discussion
Reloading a single node
I want to reload a single current node from a usercontrol. Can somebody help me with the exact code.
Thanks,
Just replace the hardcoded id with Request.Querystring Id and I think that should work.
Cheers,
Richard
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
is working on a reply...
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.