I have some code where I am trying display either jpgs or gifs.
They are going an image tag:
<img src="" id="PictureDisplay" alt="" />
This displayed fine under VS 2003 but when I moved this over to VS 2005, it
doesn't seem to handle gif, but jpgs work fine.
If I have the img tag set to:
<img src="c:\uploads\logo.jpg" id="PictureDisplay" alt="" />
it works fine.
If I have it set to:
<img src="c:\uploads\logo.gif" id="PictureDisplay" alt="" />
it doesn't.
I had originally just went into Paint Shop Pro, changed it to a jpg and then
it worked fine.
Why the problem?
Thanks,
Tom
Hans Kesting - 15 Feb 2008 09:34 GMT
tshad wrote on 15-2-2008 :
> I have some code where I am trying display either jpgs or gifs.
>
[quoted text clipped - 25 lines]
>
> Tom
Not sure why a .gif would fail (both files *do* exist there, don't
thay?) but a remark about your src attribute:
a src of "C:\..." will only work on your development box and not when
you deploy to a server. The browser will look into it's *local* C:\
path for that image and probaly fail (personally I don't have a
C:\uploads directory ...).
You need to have a http:// path in there (but it might be a relative
path). The file needs to be served via the webserver (and be in a path
that can be accessed by that server)
Hans Kesting
Aidy - 15 Feb 2008 10:00 GMT
Long shot but have you tried;
<img src="file://c:\uploads\logo.gif" id="PictureDisplay" alt="" />
And could you define "doesn't work"?
>I have some code where I am trying display either jpgs or gifs.
>
[quoted text clipped - 25 lines]
>
> Tom