Getting error on any field other name when using MNTP and the Umbraco Core Property Value Converters.
Using
var typedMultiNodeTreePicker = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("resourcespicker");
Exception: System.Web.HttpCompileException (0x80004005): c:\inetpub\dev\dev-advisors-new.mysite.com\Views\MacroPartials\GetInfo.cshtml(33): error CS1061: 'Umbraco.Core.Models.IPublishedContent' does not contain a definition for 'mDescription' and no extension method 'mDescription' accepting a first argument of type 'Umbraco.Core.Models.IPublishedContent' could be found (are you missing a using directive or an assembly reference?)
Getting Error retrieving Any Data from MNTP
Getting error on any field other name when using MNTP and the Umbraco Core Property Value Converters.
Using
var typedMultiNodeTreePicker = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("resourcespicker");
Exception: System.Web.HttpCompileException (0x80004005): c:\inetpub\dev\dev-advisors-new.mysite.com\Views\MacroPartials\GetInfo.cshtml(33): error CS1061: 'Umbraco.Core.Models.IPublishedContent' does not contain a definition for 'mDescription' and no extension method 'mDescription' accepting a first argument of type 'Umbraco.Core.Models.IPublishedContent' could be found (are you missing a using directive or an assembly reference?)
Any thoughts
Hi Jeff,
Could you please post how you are getting 'mDescription' and also which version of the value converters you are using?
Thanks,
Jeavon
Using 2.05. I just uninstalled the 2.0 beta and installed 2.05. "mDescription" is a rich text field.
Here's my basic loop
foreach (var item in typedMultiNodeTreePicker)
{
@item.mDescription
}
Ah cool, to access a property like that you need to use dynamics, so
There is a dynamics example on each page of documentation after the typed one e.g. Multinode picker
Hope that works?
Jeavon
Hey Jeff, did the above work for you?
Jeavon
Yes it did, thank you for the info.
Great! Could you please mark the correct solution using the green tick?
is working on a reply...