The call is ambiguous between the following methods or properties: error
Dear Umbraco Forum Team
I get the following error when adding tag <img class="center-block" src="@Umbraco.Media(itm.image).Url"> to a partial view:
The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(params int[])' and 'Umbraco.Web.UmbracoHelper.Media(params string[])'
I already have another partial view using the same code, and renders child page items as normal.
The call is ambiguous between the following methods or properties: error
Dear Umbraco Forum Team
I get the following error when adding tag <img class="center-block" src="@Umbraco.Media(itm.image).Url"> to a partial view: The call is ambiguous between the following methods or properties: 'Umbraco.Web.UmbracoHelper.Media(params int[])' and 'Umbraco.Web.UmbracoHelper.Media(params string[])'
I already have another partial view using the same code, and renders child page items as normal.
Thanks Dibs
Dibs,
Where is itm.image coming can you show that code also what type of property is image?
Regards
Ismail
Hi Ismail
here is my code @{ var source = CurrentPage.Children("psPage").Where("Visible"); }
@if (source.Any()) { @foreach (var itm in source) {
<a href="@itm.Url" title="@itm.Name"><img src="@Umbraco.Media(itm.image).Url"><br/>@itm.Name
}
It is from a child page under a parent page and is of media picker type
Thanks Dibs
is working on a reply...