.ASPX Page Displays .GIF Images But Not .JPG!!

A

Altemir

Why can't I get a simple .jpg image to display as the banner of my
..aspx page? I added an image control to the page from the Toolbox of
Visual Studio and entered a valid image URL. Here's the code that it
created for me:

<asp:Image id="Banner" BorderStyle="None" runat="server" Width="898px"
ImageUrl="Banner.jpg" Height="225px"></asp:Image>

All I get is a failed image icon (little red cross). The image will
not display in Designer nor in localhost or remote host environments
using Internet Explorer.

The funny thing is that I can see the image if it's a GIF instead of a
JPG. But I want to use a JPG. Why could this be happening and how do
I fix it???

Thanks,

--David
 
L

LosManos

hejdig.

Can you see the jpg any other way? In a picture viewer? Is it corrupt?

What happens when you show it through ordinary HTML?
<img url="Banner.jpg"/> <!--or something like that-->

Are the pictures in the same place? Is the path correct?

Happy hacking.

/OF

-----------<----------
 
J

Juan T. Llibre

1. Check your image path ( is the jpg in the same directory as your file ? ).
2. Make sure the ASP.NET account has read permission on the jpg file

ASP.NET has no problems displaying jpg image files.
 
A

apathetic

Altemir said:
All I get is a failed image icon (little red cross). The image will
not display in Designer nor in localhost or remote host environments
using Internet Explorer.

In addition to the other suggestions posted, it's possible that the JPG
file has been saved using the CMYK colour mode, which Internet Explorer
can't read. In that case you'll need to use something like Photoshop to
convert the image to RGB.

apathetic
 

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

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top