Here is part of my code:
@using Umbraco.Web;
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
var mTest = Model.Content.GetPropertyValue<string>("info", true);
}
<div>
@mTest
</div>
It is impossible to get the content of info
property. I am getting the following error: Object reference not set to an instance of an object. From the other side, everything works fine by using:
@Umbraco.Field("info", recursive: true)
However, I want to use the first approach. I'd appreciate any help on that.
See Question&Answers more detail:os