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 have a C# usercontrol and I want to search for a specific node (under the current one) by nodeName and retrieve a value from that node.
I assume I need NodeFactory (?) but other than that ... I'm not sure! (Umbraco v4.5)
You could use Linq to Umbraco for this (http://www.aaron-powell.com/training-videos - http://our.umbraco.org/wiki/reference/api-cheatsheet/linq-to-umbraco).
Jeroen
..edit
Hendy's Umbraco helper class is also a great way to solve your problem. Download the dll, add it to your /bin folder and add a reference to it in VS.
http://blog.hendyracher.co.uk/umbraco-helper-class/
Then you can find your node and data with something like this:
Node childnode = UmbracoHelper.GetChildNodeByName("nameOfNode");//Get document and retrieve dataDocument doc = new Document(childnode.Id);var docData = doc.getProperty("alias").Value.ToString();
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get details from a node from usercontrol
I have a C# usercontrol and I want to search for a specific node (under the current one) by nodeName and retrieve a value from that node.
I assume I need NodeFactory (?) but other than that ... I'm not sure! (Umbraco v4.5)
You could use Linq to Umbraco for this (http://www.aaron-powell.com/training-videos - http://our.umbraco.org/wiki/reference/api-cheatsheet/linq-to-umbraco).
Jeroen
..edit
Hendy's Umbraco helper class is also a great way to solve your problem. Download the dll, add it to your /bin folder and add a reference to it in VS.
http://blog.hendyracher.co.uk/umbraco-helper-class/
Then you can find your node and data with something like this:
is working on a reply...