Problems with gifs

T

tshad

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
 
H

Hans Kesting

tshad wrote on 15-2-2008 :
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

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
 
A

Aidy

Long shot but have you tried;

<img src="file://c:\uploads\logo.gif" id="PictureDisplay" alt="" />

And could you define "doesn't work"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top