Tuesday, 15 September 2015

asp.net - ASP Content Images not working -



asp.net - ASP Content Images not working -

:(

images showing fine when local:

but when upload server doesn't link?

live demo

i saw so's had similar problems , told "img src="~/..." that's not working.

here's code:

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

here's content folder:

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

edit

you see images working on server that's 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 doesn't utilize same links, or perchance images don't 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

No comments:

Post a Comment