image file not loaded when debugging an ASP.NET web app in VS

Viewed 41

I'm beginning to learn web development in ASP.NET and using VS 2019. I've downloaded some free bootstrap files from internet and and got some static pages and located them into wwwroot\ folder. And I built/ran the solution, and some images in that pages, which shows nicely when I directly opened the html file, do not show when I ran the solution (Ctrl+F5) in the IIS Express.

here's some instances of codes that are supposed to show images

    <div class="carousel-item" style="background-image: url('http://placehold.it/1900x1080')">
      <div class="carousel-caption d-none d-md-block"> ... some codes... </div>
    </div>

or

    <div class="card h-100">
      <a href="#"><img class="card-img-top" src="http://placehold.it/700x400" alt=""></a>
      <div class="card-body"> ...some codes... </div>
    </div>

when I change the url or src to some local file path or public link, the image loaded nicely in IIS express as well. But why the codes shown above aren't working only when I ran the solution? Is it relevant that the filenames don't have extensions?

I wish your kind help.

0 Answers
Related