Aggravating Noob Question - Images won't display

Discussion in 'ASP .Net' started by Arch Stanton, Mar 6, 2008.

  1. Arch Stanton

    Arch Stanton Guest

    I'm an absolute newbie trying to teach myself asp.net from a dummies
    book and the web. Sorry in advance.

    I'm just trying to display images on my .aspx page. I've tried both of
    these approaches:

    <img src="CTLogo.gif" />


    <asp:image runat="server"
    id="CTLogo"
    imageurl="CTLogo.gif"
    alternatetext="No Image" />

    Both of these are in the body of my page (between the BODY tags>, and
    the image CTLogo.gif is in the same directory as the .aspx files. But I
    keep getting the 'broken image' icon or the alternate test. The dummies
    book and every web page I've tried say this should work. If I paste the
    first one into a file with a .html format, it works fine.

    Can anybody give me pointers on what to try?
     
    Arch Stanton, Mar 6, 2008
    #1
    1. Advertisements

  2. Arch Stanton

    Mufaka Guest

    Arch Stanton wrote:
    > I'm an absolute newbie trying to teach myself asp.net from a dummies
    > book and the web. Sorry in advance.
    >
    > I'm just trying to display images on my .aspx page. I've tried both of
    > these approaches:
    >
    > <img src="CTLogo.gif" />
    >
    >
    > <asp:image runat="server"
    > id="CTLogo"
    > imageurl="CTLogo.gif"
    > alternatetext="No Image" />
    >
    > Both of these are in the body of my page (between the BODY tags>, and
    > the image CTLogo.gif is in the same directory as the .aspx files. But I
    > keep getting the 'broken image' icon or the alternate test. The dummies
    > book and every web page I've tried say this should work. If I paste the
    > first one into a file with a .html format, it works fine.
    >
    > Can anybody give me pointers on what to try?

    Is your aspx page is defining a <base href="..." />? If so, the image
    will try to be retrieved from that base location.

    If not, then the image should be ok if it does actually exist in the
    same directory and your name is correct.
     
    Mufaka, Mar 6, 2008
    #2
    1. Advertisements

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. Sunny Henry via .NET 247

    "HTTP GET" won't display - PLEASE HELP !

    Sunny Henry via .NET 247, Mar 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    812
    Sunny Henry via .NET 247
    Mar 19, 2005
  2. Sue
    Replies:
    5
    Views:
    2,560
    Shawn Mehaffie
    Jan 22, 2004
  3. nobody

    Winform won't display

    nobody, Jul 12, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    380
    nobody
    Jul 12, 2004
  4. Chad
    Replies:
    4
    Views:
    8,631
  5. Melissa
    Replies:
    1
    Views:
    543
  6. Neil C
    Replies:
    6
    Views:
    11,439
    dmajeed
    Jul 10, 2010
  7. Replies:
    4
    Views:
    559
  8. edfialk
    Replies:
    8
    Views:
    288
    David Mark
    Aug 3, 2007
Loading...