Tuesday, January 2, 2018

asp net ASP Content Images not working

asp net ASP Content Images not working




asp.net - ASP Content Images not working -

:(

images showing fine when local:

but when upload server doesnt link?

live demo

i saw sos had similar problems , told "img src="~/..." thats not working.

heres code:

<img src="~/content/images_fixed/@(item.link).scale_20.jpg" width=" 190" height="130" />

heres content folder:

it shows "nothing" in folder if click show all see images. images in folder thats not error (as can see load fine locally)

edit

you see images working on server thats because using <img src="http://www.jdmdev.net/sweetscomplete/images/@(item.link).scale_20.jpg" />

instead of <img src="~/content/images_fixed/@(item.link).scale_20.jpg" /> problem still here not solved reason when upload project doesnt utilize same links, or perchance images dont uploaded(even though appear on github fine).

resolution

the cause: when import images in visual studio, need include in project. work locally, 1 time set on live server no longer see images. must include in project, re-open visual studio , update svn server retrieving build from.

try include these images in project, seek publish site. maybe not uploading onto server.

update: if show files in project in visual studio, , include in project images, added .csproj file. can commit changes github (including .csproj file) , allow azure build project , upload files server.

asp.net image

go to link download
download
alternative link download

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.