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

  • Thread starter Thread starter Altemir
  • Start date Start date
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
 
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

-----------<----------
 
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.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
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
 
Back
Top