I have an Image folder with some files, and a table with the path of this images. When trying to list the images like this:
@foreach (var image in Model.Product.Image)
{
<img src="@image.Path" height="100" />
}
ASP.NET references @image.Path with the Page route(print from Google Dev Tools):
It seems to be really simple to solve this problem, but I've got no clue how to do.
I just need to remove the Products/ part o f the URL and my problem is solved. I don't understand why Razor references @image.Path in this context with the name of the Controller.

Aucun commentaire:
Enregistrer un commentaire