Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Problems with gifs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tshad - 15 Feb 2008 07:56 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.