Image URL is correct but image not showing
Posted
by
mattgcon
on Stack Overflow
See other posts from Stack Overflow
or by mattgcon
Published on 2011-01-12T03:45:00Z
Indexed on
2011/01/12
3:53 UTC
Read the original article
Hit count: 225
I have a website on GoDaddy. All permissions are set correctly and the image DOES exist. However when the page loads the image for the item selected does not show. Here is my code
imagepath = "~/spaimages/" + currentSpaModel.Name.ToString() + ".png";
if (File.Exists(Server.MapPath(imagepath)))
{ this.spaimage.ImageUrl = Server.MapPath(imagepath); }
spaimage is an ASP control and thr URL that the image is set to is D:\hosting\xxxxxxx\calspas\spaimages\modelname.png
What am I doing wrong.
© Stack Overflow or respective owner