0
votes

I want to set a background image from the database into my view based on the record shown in the view, however when passing the value from the database into the css property, it doesn't show on the view. I checked the browser console and it states:

Failed to load resource: the server responded with a status of 403 (Forbidden)

Markup:

<div id="book-page" 
     style="background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../../img/Books/Backgrounds/@Model.FeaturedRandom.BookBackgroundImage') no-repeat center/cover;" 
     class="page-container">
1
i got this to work, my issue was that the value in the database did not match up with the image i had in the img folderjeremyo

1 Answers

0
votes

what is the data stored in BookBackgroundImage ??