Looks like it is using Mvc, and their are no example of how to get the values of a Multi Node Tree Picker using WebForms Rendering Engine, instead of Mvc. Can someone please help me understand a way to use this Data Type and get the information with ASP.NET, using WebForms, and in a .cs file please?
For example, I would get the values of a Nodes property called myProperty like so (where aNode is of type umbraco.NodeFactory.Node):
if (aNode.GetProperty("myProperty") != null)
{
if (int.TryParse(aNode.GetProperty("myProperty").Value, out theID))
{
myClass.MyProperty = theID;
}
}
So, this would set myClass.MyProperty to the Nodes ID. How to do this on a Multi Node Tree Picker Data Type in the same manner?
Also, do I need to include an additional namespace other than that of umbraco.NodeFactory?
When rendering with WebForms the recommended method for rendering Umbraco content is a Partial View Macro, then you can use the same snippets here as those using MVC rendering.
Is it not possible to get these values within .cs files that are linked to UserControls (.ascx/.ascx.cs files)? Just updated to Umbraco 7.1.2, from version 4.7.1, and not looking to rewrite the entire site if at all possible.
Get values of MultiNode Tree Picker using WebForms engine?
Hello, have noticed this link here: http://our.umbraco.org/wiki/reference/code-snippets/razor-snippets/get-values-from-ucomponents-multi-node-tree-picker-multiple-textstring
Looks like it is using Mvc, and their are no example of how to get the values of a Multi Node Tree Picker using WebForms Rendering Engine, instead of Mvc. Can someone please help me understand a way to use this Data Type and get the information with ASP.NET, using WebForms, and in a .cs file please?
For example, I would get the values of a Nodes property called myProperty like so (where aNode is of type umbraco.NodeFactory.Node):
So, this would set myClass.MyProperty to the Nodes ID. How to do this on a Multi Node Tree Picker Data Type in the same manner?
Also, do I need to include an additional namespace other than that of umbraco.NodeFactory?
When rendering with WebForms the recommended method for rendering Umbraco content is a Partial View Macro, then you can use the same snippets here as those using MVC rendering.
Jeavon
Is it not possible to get these values within .cs files that are linked to UserControls (.ascx/.ascx.cs files)? Just updated to Umbraco 7.1.2, from version 4.7.1, and not looking to rewrite the entire site if at all possible.
Yes, have your user control extend
Umbraco.Web.UI.Controls.UmbracoUserControl
then you will have access to UmbracoHelper in the Umbraco property.is working on a reply...