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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...