I am new to ASP.net core. I created a web application for a clothes store that allows users to create a new product and store it in the database.
I created an images folder in wwwroot folder. I stored a bunch of images in this image folder. What I am trying to do is to display each images for each product in the index page and the detail page as well. How do i do that?
"wwwroot" can be accessed by URL.
(eg https://localhost:44374/image/image.png)
If you have the URL address of the image,
Images can be displayed via the "img" tag.
Create an "ImageUrl" field in "class Cloth",
Save the url of the image.
Now, just put the saved url in the 'img' tag.
How to use img tag here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.