Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: How to use IImageFile in a Razor function with background-image url

$
0
0
I think I found the possible solution with MediaUrls.BuildUrl()?
<div style="background-image: url(@MediaUrls.BuildUrl(Image.Data, UrlKind.Public));"></div>
Does this look reasonable?

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>