<img> tag and resource files for scr-source?

Discussion in 'ASP .Net Building Controls' started by Ole Hanson, Jan 10, 2005.

  1. Ole Hanson

    Ole Hanson Guest

    I want to compile my images into a resource file and then use this for my
    <img> tags in my table (<table><tr><img scr=(my resourcefile)</tr></table>;
    instead of having a list of images on my server...

    How can this be accomplished??

    Thanks you!

    /Ole
     
    Ole Hanson, Jan 10, 2005
    #1
    1. Advertising

  2. You'll need a special page to output these images.
    Every <img> tag will need to point to this page.
    You page will read the image from the resource file and use
    Response.OutputStream.Write method.

    This example demonstrates how to do it, except it read from a database
    instead of a resource file so it gets you at least half way there.
    http://steve.orr.net/content/asp200307so_f.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net



    "Ole Hanson" <> wrote in message
    news:...
    >I want to compile my images into a resource file and then use this for my
    ><img> tags in my table (<table><tr><img scr=(my resourcefile)</tr></table>;
    >instead of having a list of images on my server...
    >
    > How can this be accomplished??
    >
    > Thanks you!
    >
    > /Ole
    >
     
    Steve C. Orr [MVP, MCSD], Jan 10, 2005
    #2
    1. Advertising

  3. On Mon, 10 Jan 2005 21:16:45 +0100, Ole Hanson wrote:

    > I want to compile my images into a resource file and then use this for my
    > <img> tags in my table (<table><tr><img scr=(my resourcefile)</tr></table>;
    > instead of having a list of images on my server...
    >
    > How can this be accomplished??
    >


    http://www.antoniob.com/projects/PStreamImage.aspx

    --
    http://www.antoniob.com/
    remove antispam XremoveX from e-mail !
     
    Antonio Bakula, Jan 11, 2005
    #3
  4. Ole Hanson

    Ole Hanson Guest

    I managed to make this very scenario happen (extracting images from
    res-files) by inspiration from this article:
    http://www.codeproject.com/aspnet/ressrvpage.asp

    Basically you should implement the IHTTPHandler interface and implement the
    method ProcessRequest. This will allow you to make a page that emits binary
    data instead of html.

    Works a charm.

    Hope it helps!

    /Ole


    "Antonio Bakula" <> wrote in message
    news:yft0d5z6oizm$.1pty39lv43sv9$...
    > On Mon, 10 Jan 2005 21:16:45 +0100, Ole Hanson wrote:
    >
    >> I want to compile my images into a resource file and then use this for my
    >> <img> tags in my table (<table><tr><img scr=(my
    >> resourcefile)</tr></table>;
    >> instead of having a list of images on my server...
    >>
    >> How can this be accomplished??
    >>

    >
    > http://www.antoniob.com/projects/PStreamImage.aspx
    >
    > --
    > http://www.antoniob.com/
    > remove antispam XremoveX from e-mail !
     
    Ole Hanson, Jan 12, 2005
    #4
    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. news.austin.rr.com

    how to download img from html img tag

    news.austin.rr.com, Apr 27, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    523
    Steve C. Orr [MVP, MCSD]
    Apr 27, 2005
  2. Michael Westphal
    Replies:
    10
    Views:
    164,109
  3. news.verizon.net
    Replies:
    3
    Views:
    571
    Whitecrest
    Jun 21, 2004
  4. christy

    IE8 img scr="" displays a red X

    christy, Jul 24, 2009, in forum: ASP .Net
    Replies:
    3
    Views:
    3,109
    christy
    Jul 27, 2009
  5. Ole Hanson

    <scr> tag and image files embedded in resource files? (how)?

    Ole Hanson, Jan 10, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    185
    Steve C. Orr [MVP, MCSD]
    Jan 10, 2005
Loading...

Share This Page