I am using mvc EF6 to display images from SQL server database,
We have saved the image to the local Folder, and its URL to the Database.
doing fine
image url save like
C:\Users\Naveed\Desktop\EndToEnd\UserImages\6360831428333175151-posterior-teeth.jpg
then i use below code in my view to display the Images.
@model IEnumerable<iSmileFinal.Models.Imaging>
@if (Model != null)
{
<div class="adsm-sec">
@foreach (var vad in Model)
{
<div id="img">
<div class="adsm-image-wraper">
@*@{string imagePath = Url.Content("~/UserImages/");}*@
@*<img src='@Url.Content("~/UserImages/")' alt="no photo" />*@
<img src='@Url.Content(vad.ImageUrl)' alt="no photo" class="adsm-image" />
<img src='@Url.Content(String.Format(vad.ImageUrl))' style="width:200px; height:90px;" />
</div>
</div>
<img>@Html.DisplayFor(modelItem => vad.ImageUrl)
@Html.DisplayFor(modelItem => vad.ImageType)
@Html.DisplayFor(modelItem => vad.Comments)
}
</div>
}
but it is not displaying the images. it displays like (See Image)
i use Google Chrome and FF.