Images Not Showing in MVC
I am working on MVC4 project and facing a problem.The project on which i
am working was developed in web forms.The html of pages is already saved
in Database.I am getting this html from DB and showing it on Views. Now
the problem is that this Html aslo contains Images and links and these are
working fine in web forms application but in MVC images and links are not
working i.e images fail to load due to invalid path although i have made
the same folder structure. Here is an example.
Suppose i have an image in folder App_Themes/Theme1/Img/download_icon.gif.
Now in MVC project if i give this image the src like
/App_Themes/Theme1/Img/download_icon.gif it is loaded correctly but if i
give it the src like App_Themes/Theme1/Img/download_icon.gif it does not
load and this is saved in Db. My question is how can i load all images
correctly that come from Db in html?
No comments:
Post a Comment