3
Answers

Get image from database in mvc view

Akash Patil

Akash Patil

8y
244
1
hello experts
 
I stored image on server and in database stored the path of that image now i want to view image on razor view.
 
i tried this but get same image for all product
 
<img src="@Url.Content("/Images/image.jpg")" width="100" height="100" /> 
 
if i use below i get null not display anything
 
<img src="@Url.Content(item.Image1)" alt="" /> 
 
in database Image1(column) have path of the image
 
Please help
 
Thank You 
Answers (3)