473,396 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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

Oct 26 '06 #1
4 1996
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

-----------<----------

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

Oct 26 '06 #2
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" <da***********@gmail.comwrote in message
news:11*********************@k70g2000cwa.googlegro ups.com...
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

Oct 26 '06 #3
Altemir wrote:
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
Oct 26 '06 #4
That was the problem: I saved it as CYMK. Didn't know that. Thank
you very much!!!
apathetic wrote:
Altemir wrote:
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
Oct 27 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: M K | last post by:
Our production software (which works with images) has an internal webserver operating on port 80. This resides in within our firewall. It processes scripts (kpl scripts) that generate an image. So...
7
by: Nilesh | last post by:
I am using background-image attribute in a CSS file and linking the CSS file to aspx page. But strangly, background-image attribute is not working for relative URL. e.g. If I apply following css...
2
by: Craig | last post by:
I've done this before, but I must be missing something.... I got a new laptop, installed .net framework 1.1, IIS, VS 2003, and now when I try and create a Virtural Directory and open it up in a...
1
by: Yaseen D M | last post by:
I am using a third party tool to generate charts. This tool generates charts in .png or .jpg image. And in aspx page i have some more images with company logos and all, Now i want to export this...
4
by: Josue Maldonado | last post by:
hello list, I have the following code in a pure .html file: http://rafb.net/paste/results/uBHL5J92.html and it displays properly in both FF 1.506 and IE 6:...
1
by: Jai | last post by:
Hi All, As When I am displaying my html page which contains images also inside content placeholder with panel control.....it is only showing text and not the Images.....................please...
3
by: jenp | last post by:
Hello I've got a rather tricky problem here - i'm looking to insert a graph into a web page - which is represented as a jpeg image. Due to the restrictions of the framework i'm developing...
1
by: noneya22 | last post by:
We have a website that displays images by way of a general purpose aspx page. We do this because we can't (for security purposes) have the images in a publicly accessible area that can be...
1
by: Vahagn | last post by:
Hi,- I am wondering how one can make an .aspx page display an image whose url is given in the code-behind. I have some .jpg files in my database, whose urls I retrieve as the page loads and want...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.