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

Discussion in 'ASP .Net' started by Altemir, Oct 26, 2006.

  1. Altemir

    Altemir Guest

    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
    Altemir, Oct 26, 2006
    #1
    1. Advertising

  2. Altemir

    LosManos Guest

    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???
    LosManos, Oct 26, 2006
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:...
    > 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
    >
    Juan T. Llibre, Oct 26, 2006
    #3
  4. Altemir

    apathetic Guest

    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
    apathetic, Oct 26, 2006
    #4
  5. Altemir

    Altemir Guest

    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
    Altemir, Oct 27, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Richard
    Replies:
    3
    Views:
    4,110
    velocity4anil
    Sep 19, 2007
  2. Chumley Walrus
    Replies:
    1
    Views:
    12,177
    =?Utf-8?B?QnJpYW4gQnJvd24=?=
    Dec 16, 2004
  3. Beauregard T. Shagnasty

    Re: filename.gif or filename.gif.jpg?

    Beauregard T. Shagnasty, May 30, 2008, in forum: HTML
    Replies:
    1
    Views:
    745
    Jonathan N. Little
    May 30, 2008
  4. Bergamot
    Replies:
    0
    Views:
    450
    Bergamot
    May 30, 2008
  5. Vance Collins
    Replies:
    1
    Views:
    149
    Ray at
    Jan 22, 2004
Loading...

Share This Page