Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default <ASP:IMAGE>

    Hello,

    Does anyone know of a way to handle broken href image tags either by using
    the html img tag or the asp:image server control? For example, if my src
    attribute is broken, I would like to display an alternate image, ie one that
    blends in with the background instead of the standard eye sore x.

    I would imagine I could use the <asp:image> server controls events to check
    the src and then change it if it is broken, i am just not clear on how to do
    this.

    Thanks,
    Chris


    Chris Fink Guest

  2. Similar Questions and Discussions

    1. determine image information on image stored in MySQL BLOB
      Hi all, I store images in my DB as BLOB. When I want to place them in an html table, I want to determine the width of the image in order to...
    2. Open Image in 'Kodak Image Edit Control' with web browser.
      hi, 1.I want to show a image file of type '.tif' in the browser window; for that I'm writting as ASP code page. 2.This '.tif' type image can be...
    3. How To Browse for an image file and save it to image server folder
      I trying to browse for an image file and save it to the server image folder. in other words , upload the picture. I tried html and aspx.net...
    4. Can I take a small (320x240), blurry image, and make it a clear, large image?
      Just wondering if there is an easy way to do this? I'm sure it won't be perfect cause photoshop can only work with what's there, but maybe it can...
    5. Photoshop 7.0 Sliced Image Causes DreamWeaver MX Table To add 1 Pixel gif image!
      Hello, I sliced my page in Photoshop 7 and did a "Save Optimized" to HTML. I opened the page in Dreamweaver MX and it looks find. I want the TABLE...
  3. #2

    Default Re: <ASP:IMAGE>

    Hi

    The image tag has onerror event, at least in explorer

    <img onerror="setDefaultImg(this)">

    function setDefaultImg(e){
    e.src = "theDefaultImage.gif";
    }

    --
    Best Regards
    Vidar Petursson
    ==============================
    Microsoft Internet Client & Controls MVP
    ==============================
    "Chris Fink" <chris@chrisfink.com> wrote in message
    news:uAni1dSUDHA.2196@TK2MSFTNGP12.phx.gbl...
    > Hello,
    >
    > Does anyone know of a way to handle broken href image tags either by using
    > the html img tag or the asp:image server control? For example, if my src
    > attribute is broken, I would like to display an alternate image, ie one
    that
    > blends in with the background instead of the standard eye sore x.
    >
    > I would imagine I could use the <asp:image> server controls events to
    check
    > the src and then change it if it is broken, i am just not clear on how to
    do
    > this.
    >
    > Thanks,
    > Chris
    >
    >

    Vidar Petursson Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139