Hi Forum.
I am totally lost. I have tried hundreds of different things. I can not get any output with ImageCropper and Content in a Partial View.
I have the code:
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var selection = Umbraco.Content(1086).Children().OrderBy("CreateDate desc");
var numbers = 0;
}
@foreach (var item in selection)
{
if (item.HasValue("newsImage")) {
<img src="@Url.GetCropUrl(item, propertyAlias: "newsImage", "newsPicture")" />
}
}
Visual Studio just returns:
'UrlHelper' has no applicable method named 'GetCropUrl' but appears to have an extension method by that name.
Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax.
ImageCropper error with macro and partial view
Hi Forum. I am totally lost. I have tried hundreds of different things. I can not get any output with ImageCropper and Content in a Partial View.
I have the code:
Visual Studio just returns:
How can I get it to work?
Hi Elitenet
Use this code:
The problem is that you are using dynamics, use strongly types instead
Thanks Alex!
Just what I needed.
is working on a reply...