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
Hi I am trying to get property values in a SurefaceController but I seems to work differently from my UmbracoViewPages in terms of getting the values.
Heres what Im currently doing:
I would like to be able to cast the type insted of getting object. Something like I can do in the views:
var someText = Model.Value<string>("someText");
The "form" object is IPublishedContent so I dont get why I dont have the .Value
Hi John
You are probably missing a @using Umbraco.Web statement, as the Value() extension method is in there.
@using Umbraco.Web
Value()
Thanks Søren! Solved the issue
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco 8 - Getting properties in surfacecontroller / type casting
Hi I am trying to get property values in a SurefaceController but I seems to work differently from my UmbracoViewPages in terms of getting the values.
Heres what Im currently doing:
I would like to be able to cast the type insted of getting object. Something like I can do in the views:
The "form" object is IPublishedContent so I dont get why I dont have the .Value
Hi John
You are probably missing a
@using Umbraco.Web
statement, as theValue()
extension method is in there.Thanks Søren! Solved the issue
is working on a reply...