How do my ASP.Net MVC project view folders with images?

Asked

Viewed 669 times

0

I have a question, I have a folder with images included in my ASP.NET MVC project, but when my project is running it does not map this folder so it cannot include images to my site.

I have the following way Content/NewTheme/img/:

inserir a descrição da imagem aqui

That after running my project does not map the directory shown above.

inserir a descrição da imagem aqui

Could someone help me?

  • Editing the question with irrelevant information just to get it to the top of the site won’t help you at all. Instead, try to write your question better, try to explain the problem more clearly and (if necessary) add a [mcve].

  • Post the part where you are using the image. THE CODE.

  • If you need more help, post the code you’re using to add the image for me to see.

  • @Samuelaalmeida, what is the code and what is the error?

1 answer

2


There’s something wrong with your code and not "mapping".

If you look at the path he’s trying to look for the image is:

http://localhost:1739/assets/img/user.png

However, in its image it clearly shows that the way is:

http://localhost:1739/Content/NewTheme/img/user.png

Change the path to the correct directory that the image will normally appear.

  • Thank you friend, for the tip that solved my problem, a little detail thank you very much!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.