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
I am trying to insert a image from the media archive as a background image to my promo banner. This is my current code:
style="background-image: url('@Model.Content.GetPropertyValue<IPublishedContent>('promoBackgroundImage').Url')"
But this returns a compilation error with this message: "The best overloaded method match for 'System.Tuple.Create
I used the code example from the official documentation.
Maybe try using double quotes and wrapping in brackets:
style="background-image: url('@(Model.Content.GetPropertyValue<IPublishedContent>("promoBackgroundImage").Url)')"
Thanks, that worked!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Insert image from media picker into CSS background image property
I am trying to insert a image from the media archive as a background image to my promo banner. This is my current code:
But this returns a compilation error with this message: "The best overloaded method match for 'System.Tuple.Create
I used the code example from the official documentation.
Maybe try using double quotes and wrapping in brackets:
Thanks, that worked!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.