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
Recently i set up Umbraco 11 on a blazor project, but .Value does not work. Even tho i have created a document type and added the alias as "body".
@inherits UmbracoViewPage; @using ContentModels = Umbraco.Cms.Web.Common.PublishedModels; @using Umbraco.Cms.Web.Common.Views; @{ Layout = null; } <p>test</p> @Model.Value("body")
The Error i get:
'IPublishedContent' does not contain a definition for 'Value' and the best extension method overload 'HtmlHelperValueExtensions.Value(IHtmlHelper, string)' requires a receiver of type 'IHtmlHelper'
The Value method is defined in the Umbraco.Extensions namespace. Can you verify that you have @using Umbraco.Extensions in /Views/_ViewImports.cshtml?
Value
Umbraco.Extensions
@using Umbraco.Extensions
/Views/_ViewImports.cshtml
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
'IPublishedContent' does not contain a definition for 'Value'
Recently i set up Umbraco 11 on a blazor project, but .Value does not work. Even tho i have created a document type and added the alias as "body".
The Error i get:
'IPublishedContent' does not contain a definition for 'Value' and the best extension method overload 'HtmlHelperValueExtensions.Value(IHtmlHelper, string)' requires a receiver of type 'IHtmlHelper'
The
Value
method is defined in theUmbraco.Extensions
namespace. Can you verify that you have@using Umbraco.Extensions
in/Views/_ViewImports.cshtml
?is working on a reply...